interpreTS.core package#
Subpackages#
- interpreTS.core.features package
- Submodules
- interpreTS.core.features.feature_length module
- interpreTS.core.features.feature_mean module
- interpreTS.core.features.feature_peak module
- interpreTS.core.features.feature_spikeness module
- interpreTS.core.features.feature_std_1st_der module
- interpreTS.core.features.feature_trough module
- interpreTS.core.features.feature_variance module
- interpreTS.core.features.histogram_dominant module
- interpreTS.core.features.seasonality_strength module
- interpreTS.core.features.trend_strength module
- Module contents
Submodules#
interpreTS.core.feature_extractor module#
- class interpreTS.core.feature_extractor.FeatureExtractor(features=None, feature_params=None, window_size=5, stride=1, id_column=None, sort_column=None)#
Bases:
object
- class interpreTS.core.feature_extractor.Features#
Bases:
object
- ABSOLUTE_ENERGY = 'absolute_energy'#
- BINARIZE_MEAN = 'binarize_mean'#
- CALCULATE_SEASONALITY_STRENGTH = 'seasonality_strength'#
- CROSSING_POINTS = 'crossing_points'#
- ENTROPY = 'entropy'#
- FLAT_SPOTS = 'flat_spots'#
- LENGTH = 'length'#
- MEAN = 'mean'#
- MISSING_POINTS = 'missing_points'#
- PEAK = 'peak'#
- SPIKENESS = 'spikeness'#
- STABILITY = 'stability'#
- STD_1ST_DER = 'std_1st_der'#
- TROUGH = 'trough'#
- VARIANCE = 'variance'#
interpreTS.core.time_series_data module#
- class interpreTS.core.time_series_data.TimeSeriesData(data)#
Bases:
object
A class to manage and process time series data.
- resample(interval)#
Resample the time series data to a specified interval.
Parameters#
- intervalstr
The interval to resample the data, e.g., ‘D’ for daily, ‘H’ for hourly.
Returns#
- TimeSeriesData
A new TimeSeriesData object with resampled data.
Examples#
>>> data = pd.Series([1, 2, 3, 4, 5], index=pd.date_range("2023-01-01", periods=5, freq="D")) >>> ts_data = TimeSeriesData(data) >>> resampled_data = ts_data.resample("2D")
- split(train_size=0.7)#
Split the time series data into training and test sets.
Parameters#
- train_sizefloat, optional
The proportion of the data to use for training, by default 0.7.
Returns#
- tuple of TimeSeriesData
A tuple containing the training and test sets as TimeSeriesData objects.
Examples#
>>> data = pd.Series([1, 2, 3, 4, 5]) >>> ts_data = TimeSeriesData(data) >>> train, test = ts_data.split(0.6)