Skip to content

Commit

Permalink
Bugfix: Plausible counterfactuals of a decision tree classifier - fix…
Browse files Browse the repository at this point in the history
… number of features
  • Loading branch information
andreArtelt committed Jun 3, 2020
1 parent ee4e87c commit 12f2782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ceml/sklearn/decisiontree.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class DecisionTreeCounterfactual(SklearnCounterfactual, PlausibleCounterfactualO
See parent class :class:`ceml.sklearn.counterfactual.SklearnCounterfactual`.
"""
def __init__(self, model, **kwds):
super().__init__(model=model, tree_model=model, n_dims=None, **kwds)
super().__init__(model=model, tree_model=model, n_dims=model.n_features_, **kwds)

def rebuild_model(self, model):
"""Rebuild a :class:`sklearn.linear_model.LogisticRegression` model.
Expand Down

0 comments on commit 12f2782

Please sign in to comment.