Utilities#

General-purpose helpers used across Skchange: tag classes that declare estimator capabilities, input and parameter validators, and segmentation conversions.

Tags#

Dataclasses that declare detector and interval-scorer capabilities.

SkchangeTags(estimator_type, target_tags, ...)

Extended tags for skchange estimators.

SkchangeInputTags([one_d_array, ...])

Extended input tags for skchange estimators.

ChangeDetectorTags([linear_trend_segment])

Tags specific to change detection estimators.

IntervalScorerTags([score_type, aggregated, ...])

Tags specific to interval scorer estimators.

Validation#

Input and parameter validation helpers.

validate_data(_estimator, /, X, **kwargs)

Validate X and set n_features_in_ and n_samples_in_ on the estimator.

check_interval_scorer(scorer, *[, ...])

Check if the given scorer is a valid interval scorer.

check_interval_specs(interval_specs, n_cols, *)

Validate an interval_specs array.

check_penalty(penalty, *[, ...])

Check if the given penalty is valid.

Segmentation#

Conversions between dense per-sample segment labels and sparse changepoint indices.

changepoints_to_labels(changepoints, n_samples)

Convert changepoint indices to per-sample segment labels.

labels_to_changepoints(labels)

Convert per-sample segment labels to changepoint indices.