transform
method transform(X, y=None, verbose=None)
[source]
Transform unseen data through the current branch. Transformers that are only applied on the training set are skipped. This method can only be called from atom, not from the models.
Parameters: |
X: dataframe-like
verbose: int or None, optional (default=None) |
Returns: |
pd.DataFrame
pd.Series |
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X, y)
atom.clean()
atom.impute(strat_num="knn", strat_cat="drop")
atom.prune(strategy="zscore", method="min_max", max_sigma=2)
# Transform new data through all transformers in the branch
X_transformed = atom.transform(X_new)