Skip to content

Commit

Permalink
moving new label check to the classification suite (#241)
Browse files Browse the repository at this point in the history
* moving new label check to the classification suite
  • Loading branch information
ItayGabbay committed Dec 9, 2021
1 parent 78ac7a4 commit 44aa334
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion deepchecks/checks/performance/segment_performance.py
Expand Up @@ -81,7 +81,7 @@ def run(self, dataset, model) -> CheckResult:
if self.feature_1 is None and self.feature_2 is None:
feature_importance = calculate_feature_importance(dataset=dataset, model=model)
if len(feature_importance) < 2:
raise DeepchecksValueError('Must have atleast 2 features')
raise DeepchecksValueError('Must have at least 2 features')
feature_importance.sort_values(ascending=False, inplace=True)
self.feature_1, self.feature_2 = feature_importance.keys()[0], feature_importance.keys()[1]
else:
Expand Down
2 changes: 0 additions & 2 deletions deepchecks/suites/distribution_suite.py
Expand Up @@ -11,7 +11,6 @@
"""The predefined Data Distribution suite module."""
from deepchecks import Suite
from deepchecks.checks.distribution import TrainTestDrift
from deepchecks.checks.distribution import TrustScoreComparison


def data_distribution_suite() -> Suite:
Expand All @@ -22,5 +21,4 @@ def data_distribution_suite() -> Suite:
return Suite(
'Data Distribution',
TrainTestDrift().add_condition_drift_score_not_greater_than(),
TrustScoreComparison().add_condition_mean_score_percent_decline_not_greater_than()
)
2 changes: 0 additions & 2 deletions deepchecks/suites/integrity_suite.py
Expand Up @@ -19,7 +19,6 @@
SpecialCharacters,
StringMismatchComparison,
CategoryMismatchTrainTest,
NewLabelTrainTest,
RareFormatDetection,
DominantFrequencyChange,
StringLengthOutOfBounds,
Expand Down Expand Up @@ -63,7 +62,6 @@ def comparative_integrity_suite() -> Suite:
StringMismatchComparison().add_condition_no_new_variants(),
CategoryMismatchTrainTest().add_condition_new_categories_not_greater_than(),
DominantFrequencyChange().add_condition_ratio_of_change_not_more_than(),
NewLabelTrainTest().add_condition_new_labels_not_greater_than()
)


Expand Down
5 changes: 3 additions & 2 deletions deepchecks/suites/performance_suite.py
Expand Up @@ -10,7 +10,7 @@
#
"""The predefined performance suite module."""
from deepchecks import Suite
from deepchecks.checks import TrustScoreComparison
from deepchecks.checks import TrustScoreComparison, NewLabelTrainTest
from deepchecks.checks.performance import (
PerformanceReport,
ConfusionMatrixReport,
Expand Down Expand Up @@ -43,7 +43,8 @@ def classification_suite() -> Suite:
RocReport().add_condition_auc_not_less_than(),
CalibrationMetric(),
TrustScoreComparison().add_condition_mean_score_percent_decline_not_greater_than(),
ClassPerformanceImbalance().add_condition_ratio_difference_not_greater_than()
ClassPerformanceImbalance().add_condition_ratio_difference_not_greater_than(),
NewLabelTrainTest().add_condition_new_labels_not_greater_than()
)


Expand Down

0 comments on commit 44aa334

Please sign in to comment.