diff --git a/cml/domain/complexity_reduction.py b/cml/domain/complexity_reduction.py index 0aacba2a19783cd7f4b6de0a4e1f6c51731cf0ba..85144942a3411ae7f07d9a99fc71b88e17fbd632 100644 --- a/cml/domain/complexity_reduction.py +++ b/cml/domain/complexity_reduction.py @@ -1,4 +1,5 @@ from cml.shared.parameter import PROTOCOL_LEVEL +from cml.shared.errors import NotReducableLearnblockWarning __all__ = ( @@ -40,11 +41,11 @@ class FeatureSelector: if self._to_many_features(learnblock.feature_count) \ or self.settings.max_model_reduction: past_feature_number = learnblock.feature_count - if self._filter_method_criteria(learnblock.feature_count, learnblock.rows): remove_features = self.filtering(learnblock) learnblock.drop_columns_by_index(remove_features) + else: remove_features = self.embedding(learnblock) learnblock.drop_columns_by_index(remove_features) @@ -56,7 +57,7 @@ class FeatureSelector: elif past_feature_number == learnblock.feature_count \ and self._to_many_features(learnblock.feature_count): - raise ValueError("Can't reduce learnblock") + raise NotReducableLearnblockWarning() else: continue