Skip to content

Feature request: get reasons behind predictions made by Decision Trees #913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
WladdGorshenin opened this issue Sep 14, 2018 · 4 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@WladdGorshenin
Copy link

My team had long conversation with ML.NET's team (based on issue #599) and we came up with this feature request as the result.

For a model based on decision trees we'd like to have public API method similar to Scikit Learn's "decision_path" which does the following: for each input sample in outputs route traveled from root to leaf in each tree (i.e. list of nodes and edges).

We need that to understand reasons behind each prediction our model made.

@lefig
Copy link

lefig commented Sep 14, 2018

Absolutely. My team is looking into feature analysis upfront by way of selection as part of analysis. To discount model fields. Doing something like...

for train, test in ss:
# obtain the index of each feature on the training set
idx,, = CIFE.cife(X[train], y[train], n_selected_features=num_fea)

    # obtain the dataset on the selected features
    features = X[:, idx[0:num_fea]]

    # train a classification model with the selected features on the training dataset
    clf.fit(features[train], y[train])

    # predict the class labels of test data
    y_predict = clf.predict(features[test])

    # obtain the classification accuracy on the test data
    acc = accuracy_score(y[test], y_predict)
    correct = correct + acc

But it would be great to incorporate this process within the pipeline.

@Ivanidzo4ka Ivanidzo4ka added the enhancement New feature or request label Oct 19, 2018
@Zruty0
Copy link
Contributor

Zruty0 commented Oct 22, 2018

We have a component called 'what-the-feature' in our internal codebase. It appears that this will solve the oirginal problem.

@GalOshri
Copy link
Contributor

GalOshri commented Nov 5, 2018

Hi @WladdGorshenin, from a few other discussions it sounded like the "what-the-feature"/"per-example feature gains" will solve the original problem. Can we close this issue and track moving these components to ML.NET in #599?

@WladdGorshenin
Copy link
Author

@GalOshri , it's time to close this issue!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants