From b67e96d57bfb2b8131042f657b3438f574bb3047 Mon Sep 17 00:00:00 2001
From: dmt <>
Date: Mon, 28 Oct 2019 21:32:16 +0100
Subject: [PATCH] Throw NotReducableLearnblockWarning.

---
 cml/domain/complexity_reduction.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cml/domain/complexity_reduction.py b/cml/domain/complexity_reduction.py
index 0aacba2..8514494 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
 
-- 
GitLab