Scaler
Apply one of sklearn's scalers. Categorical columns are ignored. This class can be accessed from atom through the scale method. Read more in the user guide.
Parameters: |
strategy: str, optional (default="standard") Strategy with which to scale the data. Choose from:
Train strategy on GPU (instead of CPU).
Verbosity level of the class. Choose from:
**kwargs |
Tip
Use atom's scaled attribute to check if the feature set is scaled.
Attributes
Attributes: |
estimator: sklearn transformer
feature_names_in_: np.array
n_features_in_: int |
Methods
fit | Fit to data. |
fit_transform | Fit to data, then transform it. |
get_params | Get parameters for this estimator. |
log | Write information to the logger and print to stdout. |
save | Save the instance to a pickle file. |
set_params | Set the parameters of this estimator. |
transform | Transform the data. |
Compute the mean and std to be used for scaling.
Parameters: |
X: dataframe-like
y: int, str, sequence or None, optional (default=None) |
Returns: |
Scaler Fitted instance of self. |
Fit to data, then transform it.
Parameters: |
X: dataframe-like
y: int, str, sequence or None, optional (default=None) |
Returns: |
X: pd.DataFrame Scaled feature set. |
Get parameters for this estimator.
Parameters: |
deep: bool, optional (default=True) |
Returns: |
dict Parameter names mapped to their values. |
Write a message to the logger and print it to stdout.
Parameters: |
msg: str
level: int, optional (default=0) |
Save the instance to a pickle file.
Parameters: |
filename: str, optional (default="auto") Name of the file. Use "auto" for automatic naming. |
Set the parameters of this estimator.
Parameters: |
**params: dict Estimator parameters. |
Returns: |
Scaler Estimator instance. |
Perform standardization by centering and scaling.
Parameters: |
X: dataframe-like
y: int, str, sequence or None, optional (default=None) |
Returns: |
X: pd.DataFrame Scaled feature set. |
Example
from atom import ATOMRegressor
atom = ATOMRegressor(X, y)
atom.scale()
from atom.data_cleaning import Scaler
scaler = Scaler()
scaler.fit(X_train)
X = scaler.transform(X)