pyhctsa.operations.distribution.outlier_test

pyhctsa.operations.distribution.outlier_test(y, p=2, just_me=None)

How distributional statistics depend on distributional outliers.

Removes the p% of highest and lowest values in the time series (i.e., 2*p% removed in total) and returns the ratio of either the mean or the standard deviation of the time series, before and after this transformation.

Parameters:
y : array-like

The input data vector.

p : float

The percentage of values to remove beyond upper and lower percentiles.

just_me : {'mean', 'std'}, optional

If specified, just returns a number:

  • ’mean’: returns the mean of the middle portion of the data

  • ’std’: returns the std of the middle portion of the data

If None (default), returns a dictionary.

Returns:

If just_me is specified, returns the mean or std of the middle portion of the data. Otherwise, returns a dictionary.

Return type:

float or dict