tests.core.features package#

Submodules#

tests.core.features.test_feature_length module#

tests.core.features.test_feature_length.test_calculate_length_array()#

Test the calculate_length function with a numpy array.

tests.core.features.test_feature_length.test_calculate_length_dataframe()#

Test the calculate_length function with a pandas DataFrame.

tests.core.features.test_feature_length.test_calculate_length_empty_array()#

Test the calculate_length function with an empty numpy array.

tests.core.features.test_feature_length.test_calculate_length_empty_series()#

Test the calculate_length function with an empty pandas Series.

tests.core.features.test_feature_length.test_calculate_length_series()#

Test the calculate_length function to ensure it correctly calculates the number of data points in a pandas Series.

tests.core.features.test_feature_mean module#

tests.core.features.test_feature_mean.test_calculate_mean()#

Test that calculate_mean correctly calculates the mean value of a time series.

tests.core.features.test_feature_mean.test_calculate_mean_empty_series()#

Test that calculate_mean returns NaN for an empty time series.

tests.core.features.test_feature_mean.test_calculate_mean_negative_values()#

Test that calculate_mean correctly calculates the mean for a series with negative values.

tests.core.features.test_feature_mean.test_calculate_mean_numpy_array()#

Test that calculate_mean correctly calculates the mean value of a numpy array.

tests.core.features.test_feature_peak module#

tests.core.features.test_feature_peak.test_calculate_peak()#

Test that calculate_peak correctly calculates the peak (maximum) value of a time series.

tests.core.features.test_feature_peak.test_calculate_peak_empty_series()#

Test that calculate_peak returns NaN for an empty time series.

tests.core.features.test_feature_peak.test_calculate_peak_numpy_array()#

Test that calculate_peak correctly calculates the peak (maximum) value of a numpy array.

tests.core.features.test_feature_peak.test_calculate_peak_with_negative_values()#

Test that calculate_peak correctly calculates the peak (maximum) for a series with negative values.

tests.core.features.test_feature_peak.test_calculate_peak_with_out_of_range_indices()#

Test that calculate_peak handles out-of-range start and end indices gracefully.

tests.core.features.test_feature_peak.test_calculate_peak_with_start_and_end()#

Test that calculate_peak correctly calculates the peak within a specified start and end range.

tests.core.features.test_feature_peak.test_calculate_peak_with_start_greater_than_end()#

Test that calculate_peak returns NaN if start index is greater than end index.

tests.core.features.test_feature_spikeness module#

tests.core.features.test_feature_spikeness.test_spikeness_empty_series()#

Test calculate_spikeness on an empty time series.

tests.core.features.test_feature_spikeness.test_spikeness_negative_skew()#

Test calculate_spikeness on a negatively skewed time series.

tests.core.features.test_feature_spikeness.test_spikeness_no_skew()#

Test calculate_spikeness on a time series with no skew (symmetric data).

tests.core.features.test_feature_spikeness.test_spikeness_numpy_array()#

Test calculate_spikeness on a numpy array (alternative data format).

tests.core.features.test_feature_spikeness.test_spikeness_positive_skew()#

Test calculate_spikeness on a positively skewed time series.

tests.core.features.test_feature_spikeness.test_spikeness_with_nan_values()#

Test calculate_spikeness on a time series containing NaN values.

tests.core.features.test_feature_std_1st_der module#

tests.core.features.test_feature_std_1st_der.test_calculate_std_1st_derivative_constant_series()#

Test that the standard deviation of the first derivative is zero for a constant series.

tests.core.features.test_feature_std_1st_der.test_calculate_std_1st_derivative_linear_series()#

Test that the standard deviation of the first derivative is zero for a linear series.

tests.core.features.test_feature_std_1st_der.test_calculate_std_1st_derivative_numpy_array()#

Test that the function works with a numpy array as input.

tests.core.features.test_feature_std_1st_der.test_calculate_std_1st_derivative_varying_series()#

Test the standard deviation of the first derivative for a varying series.

tests.core.features.test_feature_trough module#

tests.core.features.test_feature_trough.test_calculate_trough()#

Test that calculate_trough correctly calculates the trough (minimum) value of a time series.

tests.core.features.test_feature_trough.test_calculate_trough_empty_series()#

Test that calculate_trough returns NaN for an empty time series.

tests.core.features.test_feature_trough.test_calculate_trough_numpy_array()#

Test that calculate_trough correctly calculates the trough (minimum) value of a numpy array.

tests.core.features.test_feature_trough.test_calculate_trough_with_negative_values()#

Test that calculate_trough correctly calculates the trough (minimum) for a series with negative values.

tests.core.features.test_feature_trough.test_calculate_trough_with_out_of_range_indices()#

Test that calculate_trough handles out-of-range start and end indices gracefully.

tests.core.features.test_feature_trough.test_calculate_trough_with_start_and_end()#

Test that calculate_trough correctly calculates the trough within a specified start and end range.

tests.core.features.test_feature_trough.test_calculate_trough_with_start_greater_than_end()#

Test that calculate_trough returns NaN if start index is greater than end index.

tests.core.features.test_feature_variance module#

tests.core.features.test_feature_variance.test_calculate_variance()#

Test that calculate_variance correctly calculates the variance of a time series.

tests.core.features.test_feature_variance.test_calculate_variance_empty_series()#

Test that calculate_variance returns NaN for an empty time series.

tests.core.features.test_feature_variance.test_calculate_variance_negative_values()#

Test that calculate_variance correctly calculates the variance for a series with negative values.

tests.core.features.test_feature_variance.test_calculate_variance_numpy_array()#

Test that calculate_variance correctly calculates the variance of a numpy array.

tests.core.features.test_feature_variance.test_calculate_variance_with_ddof_0()#

Test that calculate_variance correctly calculates the population variance (ddof=0).

tests.core.features.test_feature_variance.test_calculate_variance_with_identical_values()#

Test that calculate_variance returns 0 for a series with identical values.

tests.core.features.test_feature_variance.test_calculate_variance_with_single_value()#

Test that calculate_variance returns 0 for a series with a single value.

tests.core.features.test_histogram_dominant module#

tests.core.features.test_histogram_dominant.test_calculate_dominant_basic()#

Test that calculate_dominant correctly identifies the dominant value in a simple time series.

tests.core.features.test_histogram_dominant.test_calculate_dominant_bins_parameter()#

Test that calculate_dominant respects the ‘bins’ parameter for histogram granularity.

tests.core.features.test_histogram_dominant.test_calculate_dominant_empty_series()#

Test that calculate_dominant returns NaN for an empty time series.

tests.core.features.test_histogram_dominant.test_calculate_dominant_multiple_modes()#

Test that calculate_dominant returns one of the most frequent values when there are multiple modes in the data.

tests.core.features.test_histogram_dominant.test_calculate_dominant_negative_values()#

Test that calculate_dominant correctly identifies the dominant value for a series with negative values.

tests.core.features.test_histogram_dominant.test_calculate_dominant_numpy_array()#

Test that calculate_dominant correctly identifies the dominant value in a numpy array.

tests.core.features.test_seasonality_strength module#

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_empty_series()#

Test that calculate_seasonality_strength returns NaN for an empty series.

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_insufficient_data()#

Test that calculate_seasonality_strength returns NaN for insufficient data.

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_no_seasonality()#

Test that calculate_seasonality_strength identifies no seasonality. This test uses random data without any periodic pattern.

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_numpy_array()#

Test that calculate_seasonality_strength works with a numpy array.

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_strong_seasonality()#

Test that calculate_seasonality_strength identifies strong seasonality. This test uses a repeating seasonal pattern (e.g., a sine wave).

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_weak_seasonality()#

Test that calculate_seasonality_strength identifies weak seasonality. This test uses a data set with some periodicity but lower correlation.

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_with_long_periodicity()#

Test that calculate_seasonality_strength detects seasonality with longer periodicity.

tests.core.features.test_seasonality_strength.test_calculate_seasonality_strength_with_short_periodicity()#

Test that calculate_seasonality_strength detects seasonality with short periodicity.

tests.core.features.test_trend_strength module#

tests.core.features.test_trend_strength.test_calculate_trend_strength_decreasing()#

Test that calculate_trend_strength identifies a strong negative trend.

tests.core.features.test_trend_strength.test_calculate_trend_strength_empty_series()#

Test that calculate_trend_strength returns NaN for an empty series.

tests.core.features.test_trend_strength.test_calculate_trend_strength_increasing()#

Test that calculate_trend_strength identifies a strong positive trend.

tests.core.features.test_trend_strength.test_calculate_trend_strength_insufficient_data()#

Test that calculate_trend_strength returns NaN for a single data point.

tests.core.features.test_trend_strength.test_calculate_trend_strength_no_trend()#

Test that calculate_trend_strength returns a low value for a series with no trend.

tests.core.features.test_trend_strength.test_calculate_trend_strength_numpy_array()#

Test that calculate_trend_strength works with a numpy array.

tests.core.features.test_trend_strength.test_calculate_trend_strength_random_data()#

Test that calculate_trend_strength returns a low value for random data.

Module contents#