Skip to content

Commit

Permalink
Louquinze development (#1578)
Browse files Browse the repository at this point in the history
* create new text preprocessing cs

* create new text preprocessing cs

* set new defaults for text encoding

* set new defaults for text encoding

* set new defaults for text encoding

* Fix bug, rework tests

Co-authored-by: lukas <[email protected]>
  • Loading branch information
mfeurer and Louquinze authored Aug 31, 2022
1 parent f121ee4 commit 013d7ee
Show file tree
Hide file tree
Showing 14 changed files with 584 additions and 645 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,9 @@ def set_hyperparameters(
sub_config_dict[new_name] = value

sub_configuration = Configuration(
sub_configuration_space, values=sub_config_dict
sub_configuration_space,
values=sub_config_dict,
allow_inactive_with_values=True,
)

sub_init_params_dict: Optional[Dict[str, Any]] = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ class CategoricalPreprocessingPipeline(BasePipeline):
3 - Minority coalescence: Assign category 1 to all categories whose occurrence
don't sum-up to a certain minimum fraction
4 - One hot encoding: usual sklearn one hot encoding
Parameters
----------
config : ConfigSpace.configuration_space.Configuration
The configuration to evaluate.
random_state : Optional[int | RandomState]
If int, random_state is the seed used by the random number generator;
If RandomState instance, random_state is the random number generator;
Expand Down Expand Up @@ -101,7 +99,6 @@ def _get_hyperparameter_search_space(
dataset_properties: Optional[DATASET_PROPERTIES_TYPE] = None,
) -> ConfigurationSpace:
"""Create the hyperparameter configuration space.
Returns
-------
cs : ConfigSpace.configuration_space.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ class NumericalPreprocessingPipeline(BasePipeline):
2 - VarianceThreshold: Removes low-variance features
3 - Rescaling: rescale features according to a certain rule (e.g. normalization,
standartization or min-max)
Parameters
----------
config : ConfigSpace.configuration_space.Configuration
The configuration to evaluate.
random_state : Optional[int | RandomState]
If int, random_state is the seed used by the random number generator;
If RandomState instance, random_state is the random number generator;
Expand Down Expand Up @@ -94,10 +92,8 @@ def _get_hyperparameter_search_space(
dataset_properties: Optional[DATASET_PROPERTIES_TYPE] = None,
) -> ConfigurationSpace:
"""Create the hyperparameter configuration space.
Parameters
----------
Returns
-------
cs : ConfigSpace.configuration_space.Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_hyperparameter_search_space(
)

if default is None:
defaults = ["bag_of_words_encoding"]
defaults = ["tfidf_encoding"]
for default_ in defaults:
if default_ in available_preprocessors:
default = default_
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 013d7ee

Please sign in to comment.