wildboar.transform._sax#
Module Contents#
Classes#
Peicewise aggregate approximation |
|
Symbolic aggregate approximation |
|
Functions#
|
Peicewise aggregate approximation |
|
Symbolic aggregate approximation |
- class wildboar.transform._sax.PAA(n_intervals='sqrt', window=None)[source]#
Bases:
sklearn.base.TransformerMixin,wildboar.base.BaseEstimatorPeicewise aggregate approximation
- class wildboar.transform._sax.SAX(*, n_intervals='sqrt', window=None, n_bins=4, binning='normal', estimate=True)[source]#
Bases:
sklearn.base.TransformerMixin,wildboar.base.BaseEstimatorSymbolic aggregate approximation
- Parameters:
x (array-like of shape (n_samples, n_timestep)) – The input data.
n_intervals (str, optional) –
The number of intervals to use for the transform.
if “log”, the number of intervals is
log2(n_timestep).if “sqrt”, the number of intervals is
sqrt(n_timestep).if int, the number of intervals is
n_intervals.- if float, the number of intervals is
n_intervals * n_timestep, with 0 < n_intervals < 1.
- if float, the number of intervals is
window (int, optional) – The window size. If
windowis set, the value ofn_intervalshas no effect.n_bins (int, optional) – The number of bins.
binning (str, optional) – The bin construction. By default the bins are defined according to the normal distribution. Possible values are
"normal"for normally distributed bins or"uniform"for uniformly distributed bins.estimate (bool, optional) –
Estimate the distribution parameters for the binning from data.
If
estimate=False, it is assumed that each time series are:preprocessed using
datasets.preprocess.normalize()whenbinning="normal".preprocessed using
datasets.preprocess.minmax_scale(). whenbinning="uniform"
- wildboar.transform._sax.piecewice_aggregate_approximation(x, *, n_intervals='sqrt', window=None)[source]#
Peicewise aggregate approximation
- Parameters:
x (array-like of shape (n_samples, n_timestep)) – The input data.
n_intervals (str, optional) –
The number of intervals to use for the transform.
if “log”, the number of intervals is
log2(n_timestep).if “sqrt”, the number of intervals is
sqrt(n_timestep).if int, the number of intervals is
n_intervals.- if float, the number of intervals is
n_intervals * n_timestep, with 0 < n_intervals < 1.
- if float, the number of intervals is
window (int, optional) – The window size. If
windowis set, the value ofn_intervalshas no effect.
- Returns:
paa – The symbolic aggregate approximation
- Return type:
ndarray of shape (n_samples, n_intervals)
- wildboar.transform._sax.symbolic_aggregate_approximation(x, *, n_intervals='sqrt', window=None, n_bins=4, binning='normal')[source]#
Symbolic aggregate approximation
- Parameters:
x (array-like of shape (n_samples, n_timestep)) – The input data.
n_intervals (str, optional) –
The number of intervals to use for the transform.
if “log”, the number of intervals is
log2(n_timestep).if “sqrt”, the number of intervals is
sqrt(n_timestep).if int, the number of intervals is
n_intervals.- if float, the number of intervals is
n_intervals * n_timestep, with 0 < n_intervals < 1.
- if float, the number of intervals is
window (int, optional) – The window size. If
windowis set, the value ofn_intervalshas no effect.n_bins (int, optional) – The number of bins.
binning (str, optional) – The bin construction. By default the bins are defined according to the normal distribution. Possible values are
"normal"for normally distributed bins or"uniform"for uniformly distributed bins.
- Returns:
sax – The symbolic aggregate approximation
- Return type:
ndarray of shape (n_samples, n_intervals)