Returns a one-row summary of a changepoint detection result.
Usage
# S3 method for class 'ggcpt'
glance(x, ...)Value
A one-row tibble with columns: n, n_changepoints,
method, change_in, penalty_type, penalty_value,
cp_convention, total_cost (NA when the engine does
not expose a cost), runtime (elapsed seconds when measured by
cpt_detect(), otherwise NA).
Details
total_cost is reported on whatever scale the engine itself uses, so
it is meaningful when comparing penalties within one method and not when
comparing one method against another. For the changepoint engines it
is the unpenalised \(-2\log L\) of the chosen segmentation. Four cases
there are NA rather than filled with a number that would not mean
the same thing:
"binseg"and"segneigh", whosecpt.rangefits report the raw within-segment cost instead: for one and the same segmentation that is 219.7 where a PELT fit reports 659.9;"np", because changepoint.np defines nologLikmethod;a change in mean under the default
"MBIC"penalty. Loading changepoint.np (which this package imports, so it is always loaded) replaces changepoint'slogLikmethod forcptobjects with one that errors on exactly that combination. Any other penalty ("BIC","AIC", a numeric value) reports normally, as dochange_in = "var"and"meanvar".
