np_univariate
Plain univariate labeled data provider.
- class pysatl_cpd.data.providers.labeled.implementations.np_univariate.PlainUnivariateLabeledData(unlabeled, labeling, annotation)[source]
Bases:
LabeledData[Number,AnnotationT],GenericLabeled data implementation for univariate sequences.
- Parameters:
unlabeled (
NDArrayUnivariateProvider[UnlabeledTimeseriesAnnotation]) – Unlabeled data provider for the sequence.labeling (
Iterable[SegmentInfo]) – Iterable of segment information.annotation (
TypeVar(AnnotationT, bound=TimeseriesAnnotation)) – Annotation instance for labeling.
- __init__(unlabeled, labeling, annotation)[source]
- Parameters:
unlabeled (NDArrayUnivariateProvider[UnlabeledTimeseriesAnnotation])
labeling (Iterable[SegmentInfo])
annotation (AnnotationT)
- Return type:
None
- property unlabeled: NDArrayUnivariateProvider[UnlabeledTimeseriesAnnotation]
Return the underlying unlabeled data provider.
- Returns:
The underlying unlabeled data provider.
- Return type:
- classmethod from_unlabeled_data(unlabeled, segment_info, annotation)[source]
Create labeled data from an unlabeled univariate provider.
- Parameters:
unlabeled (
DataProvider[double|int|float,UnlabeledTimeseriesAnnotation]) – Unlabeled provider containing the raw series.segment_info (
Iterable[SegmentInfo]) – Segment labeling for the series.annotation (
TypeVar(A, bound=TimeseriesAnnotation)) – Annotation attached to the labeled series.
- Returns:
Concrete labeled-data provider built from the inputs.
- Return type:
PlainUnivariateLabeledData[TypeVar(A, bound=TimeseriesAnnotation)]- Raises:
TypeError – If unlabeled is not an NDArrayUnivariateProvider.
- property raw_data: UnivariateNumericArray
Return a copy of the underlying data array.
- Returns:
The underlying numeric data array.
- Return type: