Skip to content

Feature importance for random forests #210

Closed

Description

@mjmckp

When training a random forest, the scikit-learn package returns the feature importances (see http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html), where the feature importance metric is the mean decrease impurity (as described here http://blog.datadive.net/selecting-good-features-part-iii-random-forests/). Can ML.Net also provide this information?

Activity

  1. codemzs commented on May 23, 2018

    @codemzs
    Member

    Hi @mjmckp , Yes, this information is maintained in the runtime but there isn't a high level API at the moment that exposes feature importance. We are working on exposing model summary via high level API that should contain feature importance.

  2. added this to the 0618 milestone on Jun 13, 2018
  3. zeahmed commented on Jun 19, 2018

    @zeahmed
    Contributor

    Looking at the new API proposal #371, this feature will be automatically available.

    For example, in the proposed example look at this Line where predictor is created. The predictor contains several methods to save models/metadata and SaveSummary is one of them which emits feature importance where applicable.

    Also if the predictor implements ICanGetSummaryInKeyValuePairs then feature importance can be obtain as a List of KeyValuePairs. For example, see here for reference.

  4. shauheen commented on Jun 28, 2018

    @shauheen
    Contributor

    Closing this issue as #371 would address the main problem.

  5. ghost locked as resolved and limited conversation to collaborators on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions