transform
method transform(X, y=None, verbose=None)
[source]
Transform new 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: dict, list, tuple, np.array, sps.matrix or pd.DataFrame
verbose: int or None, optional (default=None) |
Returns: |
X: pd.DataFrame
y: pd.Series |
Example
from atom import ATOMClassifier
atom = ATOMClassifier(X, y)
atom.clean()
atom.impute(strat_num="knn", strat_cat="drop")
atom.prune(strategy="z-score", method="min_max", max_sigma=2)
# Transform new data through all transformers in the branch
X_transformed = atom.transform(X_new)