pyhctsa.operations.stationarity.local_global¶
-
pyhctsa.operations.stationarity.local_global(y, subset_how=
'l', n=None, random_seed=None)¶ Compare local statistics to global statistics of a time series.
- Parameters:¶
- y : array-like¶
The time series to analyse.
- subset_how : str, optional¶
The method to select the local subset of time series:
’l’: the first n points in a time series
’p’: an initial proportion of the full time series (round(N*n) points, halves rounded up)
’unicg’: n evenly-spaced points throughout the time series
’randcg’: n randomly-chosen points from the time series (chosen with replacement)
Default is
'l'.- n : int or float, optional¶
The parameter for the method specified by subset_how.
Default None is 100 samples or 0.1 (10% of time series length) if proportion.
- random_seed : int, str or None, optional¶
Seed for the ‘randcg’ option: an integer,
Noneor'default'for seed 0, or'none'for a seed drawn from NumPy’s global random state. The points come from the portable generatorpyhctsa.robust.bf_random()(uniform on the indices, with repeats), so they are hctsa’s for the same seed. Default None is seed 0.
- Returns:¶
A dictionary containing various statistical measures comparing the subset to the full time series: absmean, std, median, iqr, skewness, kurtosis, ac1 (the last four are the absolute relative deviation of the subset statistic from the full-series one, NaN when the full-series statistic is zero).
- Return type:¶
dict