TSColumnTransformer¶
-
class
hcrystalball.compose.TSColumnTransformer(transformers, *, remainder='drop', sparse_threshold=0.3, n_jobs=None, transformer_weights=None, verbose=False)[source]¶ Bases:
sklearn.compose._column_transformer.ColumnTransformerTime Series compatible ColumnTransformer.
Allow usage of hcrystalball wrappers and index based transformers. See also:
sklearn.compose.ColumnTransformer- Returns
Data transformed on given column
- Return type
- Raises
ValueError – If
remainder=='passthrough'is set. Usepassthroughas an identity estimator If sparse output is requested, but not all columns are numeric
Attributes Summary
Access the fitted transformer by name.
Access to original remainder
Methods Summary
fit(X[, y])Fit all transformers using X.
fit_transform(X[, y])Run index aware fit_transform
Get feature names from all transformers.
get_params([deep])Get parameters for this estimator.
set_params(**kwargs)Set the parameters of this estimator.
transform(X)Run index aware transform
Attributes Documentation
-
named_transformers_¶ Access the fitted transformer by name.
Read-only attribute to access any transformer by given name. Keys are transformer names and values are the fitted transformer objects.
-
remainder¶ Access to original remainder
Methods Documentation
-
fit(X, y=None)¶ Fit all transformers using X.
- Parameters
X ({array-like, dataframe} of shape (n_samples, n_features)) – Input data, of which specified subsets are used to fit the transformers.
y (array-like of shape (n_samples,..), default=None) – Targets for supervised learning.
- Returns
self – This estimator
- Return type
ColumnTransformer
-
fit_transform(X, y=None)[source]¶ Run index aware fit_transform
- Parameters
X (pandas.DataFrame) – Input features.
y (pandas.Series or numpy.array) – Target values
- Returns
Transformed data by given transformer on given column
- Return type
-
get_feature_names()[source]¶ Get feature names from all transformers.
- Returns
feature_names – Names of the features produced by transform.
- Return type
list of strings
-
get_params(deep=True)¶ Get parameters for this estimator.
-
set_params(**kwargs)¶ Set the parameters of this estimator.
Valid parameter keys can be listed with
get_params().- Returns
- Return type
self
-
transform(X)[source]¶ Run index aware transform
- Parameters
X (pandas.DataFrame) – Input features.
- Returns
Transformed data by given transformer on given column
- Return type