bic_penalty#
- bic_penalty(n_samples: int, n_params: int = 1, additional_cpts: int = 1) float[source][source]#
Create a Bayesian Information Criterion (BIC) penalty.
The BIC penalty is a constant penalty given by
(n_params + additional_cpts) * log(n_samples), where n_samples is the sample size, n_params is the number of parameters per segment in the model across all features, and additional_cpts is the number of additional change point parameters per segment. For change detection, this is 1.- Parameters:
- n_samplesint
Sample size.
- n_paramsint, default=1
Number of model parameters per segment.
- additional_cptsint, default=1
Number of additional change point parameters per segment. For change detection, this is 1.
- Returns:
- float
The BIC penalty value.
Examples
>>> bic_penalty(100) 9.210340371976184