Exemplo n.º 1
0
    def _get_pipeline(self, init_params=None):
        steps = []

        default_dataset_properties = {'target_type': 'regression'}

        # Add the always active preprocessing components
        if init_params is not None and 'one_hot_encoding' in init_params:
            ohe_init_params = init_params['one_hot_encoding']
            if 'categorical_features' in ohe_init_params:
                categorical_features = ohe_init_params['categorical_features']
        else:
            categorical_features = None

        steps.extend(
            [["categorical_encoding", OHEChoice(default_dataset_properties)],
             ["imputation", Imputation()],
             ["variance_threshold", VarianceThreshold()],
             ["rescaling", rescaling_components.RescalingChoice(
                 default_dataset_properties)]])

        # Add the preprocessing component
        steps.append(['preprocessor',
                      feature_preprocessing_components.FeaturePreprocessorChoice(
                          default_dataset_properties)])

        # Add the classification component
        steps.append(['regressor',
                      regression_components.RegressorChoice(
                          default_dataset_properties)])
        return steps
Exemplo n.º 2
0
    def _get_pipeline(self):
        steps = []

        default_dataset_properties = {'target_type': 'classification'}

        # Add the always active preprocessing components

        steps.extend([["one_hot_encoding", OneHotEncoder()],
                      ["imputation", Imputation()],
                      [
                          "rescaling",
                          rescaling_components.RescalingChoice(
                              default_dataset_properties)
                      ], ["balancing", Balancing()]])

        # Add the preprocessing component
        steps.append([
            'preprocessor',
            feature_preprocessing_components.FeaturePreprocessorChoice(
                default_dataset_properties)
        ])

        # Add the classification component
        steps.append([
            'classifier',
            classification_components.ClassifierChoice(
                default_dataset_properties)
        ])
        return steps
    def _get_pipeline_steps(self):
        steps = []

        default_dataset_props = {'target_type': 'classification'}

        steps.extend([
            ["imputation", NumericalImputation()],
            ["variance_threshold", VarianceThreshold()],
            ["rescaling", rescaling_components.RescalingChoice(default_dataset_props)],
            ])

        return steps
Exemplo n.º 4
0
    def _get_pipeline_steps(self, dataset_properties=None):
        steps = []

        default_dataset_properties = {}
        if dataset_properties is not None and isinstance(
                dataset_properties, dict):
            default_dataset_properties.update(dataset_properties)

        steps.extend([
            ["imputation", NumericalImputation()],
            ["variance_threshold", VarianceThreshold()],
            [
                "rescaling",
                rescaling_components.RescalingChoice(
                    default_dataset_properties)
            ],
        ])

        return steps
    def _get_pipeline_steps(
        self,
        dataset_properties: Optional[Dict[str, str]] = None,
    ) -> List[Tuple[str, BaseEstimator]]:
        steps = []

        default_dataset_properties = {}
        if dataset_properties is not None and isinstance(
                dataset_properties, dict):
            default_dataset_properties.update(dataset_properties)

        steps.extend([
            ("imputation", NumericalImputation()),
            ("variance_threshold", VarianceThreshold()),
            ("rescaling",
             rescaling_components.RescalingChoice(default_dataset_properties)),
        ])

        return steps