Skip to content

clf.predict or clf.predict_proba ? #1

@tomaszmf

Description

@tomaszmf

The explainer._predict_down() method, in line 116 has the following:

target_yhat = self.clf.predict(observation)

But for classification this is always cast to 1.0 or 0.0 (for binary classification), thus making the contributions sum up to 0.0 or 1.0 and not to the predicted probability of the model.

Should the aforementioned line not be changed into:

target_yhat = self.clf.predict_proba(observation)

?

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions