|
| 1 | +from autosklearn.pipeline.constants import DENSE, UNSIGNED_DATA, INPUT |
| 2 | +from autosklearn.pipeline.components.data_preprocessing.rescaling.abstract_rescaling \ |
| 3 | + import Rescaling |
| 4 | +from autosklearn.pipeline.components.base import AutoSklearnPreprocessingAlgorithm |
| 5 | + |
| 6 | + |
| 7 | +class PowerTransformerComponent(Rescaling, AutoSklearnPreprocessingAlgorithm): |
| 8 | + def __init__(self, random_state): |
| 9 | + from sklearn.preprocessing import PowerTransformer |
| 10 | + self.preprocessor = PowerTransformer(copy=False) |
| 11 | + |
| 12 | + @staticmethod |
| 13 | + def get_properties(dataset_properties=None): |
| 14 | + return {'shortname': 'PowerTransformer', |
| 15 | + 'name': 'PowerTransformer', |
| 16 | + 'handles_missing_values': False, |
| 17 | + 'handles_nominal_values': False, |
| 18 | + 'handles_numerical_features': True, |
| 19 | + 'prefers_data_scaled': False, |
| 20 | + 'prefers_data_normalized': False, |
| 21 | + 'handles_regression': True, |
| 22 | + 'handles_classification': True, |
| 23 | + 'handles_multiclass': True, |
| 24 | + 'handles_multilabel': True, |
| 25 | + 'handles_multioutput': True, |
| 26 | + 'is_deterministic': True, |
| 27 | + # TODO find out of this is right! |
| 28 | + 'handles_sparse': False, |
| 29 | + 'handles_dense': True, |
| 30 | + 'input': (DENSE, UNSIGNED_DATA), |
| 31 | + 'output': (INPUT,), |
| 32 | + 'preferred_dtype': None} |
0 commit comments