Skip to content
Snippets Groups Projects
Commit b67e96d5 authored by dmt's avatar dmt
Browse files

Throw NotReducableLearnblockWarning.

parent faab42c5
No related branches found
No related tags found
No related merge requests found
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment