Components: transform¶
autogluon.eda.analysis.transform¶
This wrapper provides transformed features to all children shadowing outer datasets with the updated one after application of FeatureGenerator. |
ApplyFeatureGenerator¶
-
class
autogluon.eda.analysis.transform.
ApplyFeatureGenerator
(parent: Optional[autogluon.eda.analysis.base.AbstractAnalysis] = None, children: Optional[List[autogluon.eda.analysis.base.AbstractAnalysis]] = None, state: Optional[autogluon.eda.state.AnalysisState] = None, category_to_numbers: bool = False, feature_generator: Optional[autogluon.features.generators.abstract.AbstractFeatureGenerator] = None, **kwargs)[source]¶ This wrapper provides transformed features to all children shadowing outer datasets with the updated one after application of FeatureGenerator.
- Parameters
- category_to_numbers: bool, default = False
if True’, then transform `category variables into their codes. This is useful when wrapped analyses expect numeric values
- feature_generator: Optional[AbstractFeatureGenerator], default = None
feature generator to use for the transformation. If None is provided then AutoMLPipelineFeatureGenerator is applied.
- parent: Optional[AbstractAnalysis], default = None
parent Analysis
- children: Optional[List[AbstractAnalysis]], default None
wrapped analyses; these will receive sampled args during fit call
- kwargs
- See alsofunc:autogluon.features.AbstractFeatureGenerator
Examples
>>> from autogluon.eda.analysis.base import BaseAnalysis, Namespace >>> import pandas as pd >>> import numpy as np >>> df_train = pd.DataFrame(...) >>> df_test = pd.DataFrame(...) >>> >>> analysis = BaseAnalysis(train_data=df_train, test_data=df_test, label='D', children=[ >>> Namespace(namespace='feature_generator_numbers', children=[ >>> ApplyFeatureGenerator(category_to_numbers=True, children=[ >>> # SomeAnalysis() # This analysis will be called with transformed `train_data` and `test_data` >>> ]) >>> ]), >>> # SomeAnalysis() # This analysis will be called with the original features >>> ])