Skip to content

Commit

Permalink
prevent Dataset object from re-inferring categorical features (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
noamzbr committed Dec 27, 2021
1 parent 4b917d3 commit c4af9e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deepchecks/checks/performance/segment_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def run(self, dataset, model) -> CheckResult:
else:
score = scorer(model,
Dataset(feature_2_df, features=dataset.features,
label_name=dataset.label_name, cat_features=[]))
label_name=dataset.label_name, cat_features=dataset.cat_features))
scores[i, j] = score
counts[i, j] = len(feature_2_df)

Expand Down
2 changes: 1 addition & 1 deletion deepchecks/checks/performance/simple_model_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _find_score(self, train_ds: Dataset, test_ds: Dataset, task_type: ModelType,
scorer = get_scorer_single(model, train_ds, self.scorer)

simple_score = scorer(_DummyModel, Dataset(pd.DataFrame(simple_pred), label=y_test))
pred_score = scorer(model, Dataset(test_ds.features_columns, label=y_test))
pred_score = scorer(model, Dataset(test_ds.features_columns, label=y_test, cat_features=test_ds.cat_features))

return simple_score, pred_score, scorer.name

Expand Down

0 comments on commit c4af9e8

Please sign in to comment.