Skip to content

Commit

Permalink
Add warning for multiclass in EBM.
Browse files Browse the repository at this point in the history
  • Loading branch information
interpret-ml committed Aug 23, 2019
1 parent 864de0e commit 6aabf1b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/interpret/glassbox/ebm/ebm.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from ...utils import gen_name_from_class, gen_global_selector, gen_local_selector

import numpy as np
from warnings import warn

from sklearn.base import is_classifier, clone
from sklearn.utils.validation import check_is_fitted
Expand Down Expand Up @@ -781,6 +782,8 @@ def fit(self, X, y):
if is_classifier(self):
self.classes_, y = np.unique(y, return_inverse=True)
self.n_classes_ = len(self.classes_)
if self.n_classes_ > 2:
warn("Multiclass is still experimental. Subject to change per release.")
if self.n_classes_ > 2 and self.interactions != 0:
raise RuntimeError(
"Multiclass with interactions currently not supported."
Expand Down

0 comments on commit 6aabf1b

Please sign in to comment.