pysad.core.BaseTransformer¶
- class pysad.core.BaseTransformer(output_dims)[source]¶
Base class for transforming methods.
Methods
__init__
(output_dims)fit
(X)Shortcut method that iteratively applies fit_partial to all instances in order.
fit_partial
(X)Fits particular (next) timestep's features to train the transformer.
Shortcut method that iteratively applies fit_transform_partial to all instances in order.
Shortcut method that iteratively applies fit_partial and transform_partial, respectively.
transform
(X)Shortcut method that iteratively applies transform_partial to all instances in order.
Transforms particular (next) timestep's vector.
- fit(X)[source]¶
Shortcut method that iteratively applies fit_partial to all instances in order.
- Parameters:
X (np.float64 array of shape (num_instances, num_features)) – Input feature vectors.
- Returns:
The fitted transformer
- Return type:
- abstract fit_partial(X)[source]¶
Fits particular (next) timestep’s features to train the transformer.
- Parameters:
X (np.float64 array of shape (num_components,)) – Input feature vector.
- Returns:
self.
- Return type:
- fit_transform(X)[source]¶
Shortcut method that iteratively applies fit_transform_partial to all instances in order.
- Parameters:
X (np.float64 array of shape (num_instances, num_components)) – Input feature vectors.
- Returns:
Projected feature vectors.
- Return type:
np.float64 array of shape (num_instances, num_components)
- fit_transform_partial(X)[source]¶
Shortcut method that iteratively applies fit_partial and transform_partial, respectively.
- Parameters:
X (np.float64 array of shape (num_components,)) – Input feature vector.
- Returns:
Projected feature vector.
- Return type:
transformed_X (np.float64 array of shape (num_components,))
- transform(X)[source]¶
Shortcut method that iteratively applies transform_partial to all instances in order.
- Parameters:
X (np.float64 array of shape (num_instances, num_features)) – Input feature vectors.
- Returns:
Projected feature vectors.
- Return type:
np.float64 array of shape (num_instances, num_components)