pyhctsa.operations.pre_process.preproc_compare

pyhctsa.operations.pre_process.preproc_compare(y, detrend_meth='medianf')

Compare time-series properties before and after pre-processing.

Applies a specified pre-processing transformation to the input time series and evaluates how selected statistical properties change relative to the original series.

Parameters:
y : array-like

Input time series.

detrend_meth : str, optional

Pre-processing method to apply.

Polynomial detrending:

  • "poly<n>": Polynomial detrending of order n (1 n 9),

e.g., "poly1" for linear detrending.

Differencing:

  • "diff<n>": Apply n successive differences,

e.g., "diff1".

Median filtering:

  • "medianf<n>": Median filter with window length n (must be odd),

e.g., "medianf3".

Running average:

  • "rav<n>": Moving average with window size n,

e.g., "rav4".

Resampling:

  • "resample_<P>_<Q>": Resample by a factor of P/Q,

where P is the upsampling factor and Q is the downsampling factor (e.g., "resample_1_2" for half rate).

Default is "medianf".

Returns:

Comparison of stationarity and distributional measures between the original and transformed time series.

Return type:

dict