Helper to construct standard penalty values for use with changepoint detection methods. Returns a numeric penalty value.
Arguments
- type
Penalty type:
"None","BIC"(or"SIC"),"MBIC","AIC","Hannan-Quinn","sSIC", or"Manual".- n
Series length. Required for BIC, MBIC, AIC, Hannan-Quinn, sSIC.
- k
Number of parameters per changepoint (typically 2 for mean+variance, 1 for mean-only). Defaults to 1. The
"MBIC"penalty additionally readskas the number of changepoints being placed, in its \(\log{n \choose k}\) term.- value
Numeric value for
Manualtype.- alpha
Exponent of the strengthened SIC (
"sSIC") penalty \(k (\log n)^\alpha\); must exceed 1. Defaults to1.01(Fryzlewicz, 2014).
Penalty semantics across engines
The same penalty name may be interpreted differently by different engines:
changepoint-based methods (PELT, BinSeg, SegNeigh, AMOC): accept character penalties (
"MBIC","BIC","AIC","Hannan-Quinn","None") and pass them to the upstream changepoint package. These methods do not accept raw numeric penalty values.Functional-pruning methods (
fpop,cpop,decafs): accept numeric penalties only. When a character penalty is supplied viacpt_detect(), it is resolved to a numeric value usingcpt_penalty()before dispatch.Search-based methods (WBS, WBS2, NOT, MOSUM, IDetect, TGUH): use internal model-selection criteria (e.g., sSIC, threshold) and generally ignore the
penaltyargument. Specify thresholds via the wrapper's own arguments.Inference/Bayesian methods (
smuce,bcp,bocpd,beast,cpm,sn): are tuned by a significance level, posterior-probability threshold, hazard, or average run length rather than a penalty; see each wrapper.MBICincpt_penalty()is a BIC-type penalty that adds a combinatorial term for the number of wayskchangepoints can be placed innobservations, \(0.5(k+1)\log n + \log{n \choose k}\). It is deliberately stronger than"BIC". It is not the modified BIC of Zhang and Siegmund (2007), whose penalty \(1.5 k \log n + 0.5 \sum_i \log(l_i / n)\) depends on the segment lengths \(l_i\) and so cannot be expressed by a function ofnandkalone. Use the character"MBIC"with changepoint-based methods to get the engine's native MBIC.
