Fixe the random_state of the transformer
This meta-transformer is usefull when you want to fix the random_state of a transformer, which is modified by some meta-estimator.
Parameters: | transformer : scikit-learn transformer random_seed : int, RandomState instance, optional (default=0)
|
---|
Attributes
transformer_ | transformer | A clone of the fitted transformer |
Methods
fit(X[, y]) | Fit estimator. |
fit_transform(X[, y]) | Fit to data, then transform it. |
get_params([deep]) | Get parameters for this estimator. |
set_params(**params) | Set the parameters of this estimator. |
transform(X) | Transform dataset. |
Fit estimator.
Parameters: | X : array-like, shape=(n_samples, n_features)
|
---|---|
Returns: | self : object
|
Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.
Parameters: | X : numpy array of shape [n_samples, n_features]
y : numpy array of shape [n_samples]
|
---|---|
Returns: | X_new : numpy array of shape [n_samples, n_features_new]
|
Get parameters for this estimator.
Parameters: | deep: boolean, optional :
|
---|---|
Returns: | params : mapping of string to any
|
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The former have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.
Returns: | self : |
---|
Transform dataset.
Parameters: | X : array-like, shape=(n_samples, n_features)
|
---|---|
Returns: | X_transformed: sparse matrix, shape=(n_samples, n_out) :
|