RandomSamplesAugmenter
Draw random samples from time series.
transform takes a time series \(X={x_1, x_2,..., x_m}\) with \(m\) elements and returns \(X_t={x_i, x_{i+1},..., x_n}\), where \({x_i, x_{i+1},..., x_n}\) are \(n`=``n`\) random samples drawn from \(X\) (with or without_replacement).
Quickstart
from sktime.transformations.augmenter import RandomSamplesAugmenter
estimator = RandomSamplesAugmenter(n=1.0, without_replacement=True, random_state=42)Tags
Capabilities
- Multivariate
- Unequal-length series
- Inverse transform: Not supported
- Missing values: Not supported
- Removes missing values: Not supported
- Equalizes series length: Not supported
Properties
- Input typescitype:transform-input
- Series
- Output typescitype:transform-output
- Series
- Label typescitype:transform-labels
- None
- Fit is emptyfit_is_empty
- Yes
- Keeps the time indextransform-returns-same-time-index
- No
- Requires Xrequires_X
- Yes
- Requires yrequires_y
- No
- X and y need the same indexX-y-must-have-same-index
- No
Parameters(5)
- n: int or float, optional (default = 1.0)
To specify an exact number of samples to draw, set n to an int value. Number of samples to draw. To specify the returned samples as a proportion of the given times series set n to a float value \(n \in [0, 1]\). By default, the same number of samples is returned as given by the input time series.
- without_replacement: bool, optional (default = True)
Whether to draw without replacement. If True, every sample of the input times series X will appear at most once in
Xt.- random_state: None or int or ``np.random.RandomState`` instance, optional
“If int or RandomState, use it for drawing the random variates. If None, rely on
self.random_state. Default is None.” [1]- References and Footnotes