Giter VIP home page Giter VIP logo

Comments (3)

janpfeifer avatar janpfeifer commented on May 18, 2024 1

Thanks @Howard-ll , we are happy to hear the tools are useful!

There are various definitions of "feature importance" -- they are all metrics about the model/dataset, but there is not an absolute "truth" or best one.

Now we should have a clear documentation page with the list of all feature importances we support -- with pointers to the papers that define some of them -> making this as an "enhancement" for us to work on.

from decision-forests.

tsachiblauamat avatar tsachiblauamat commented on May 18, 2024

I ran the feature significant and compared the results to Sklearn output. not only the results are different, but also the results that I'm getting using this implementation doesn't make any sense(using the info that I have about my data).
for example a feature that is constant is one of the most significant features(it got the heights value).

maybe I don't know how to read the output properly?
("data:0.33" (1; #27), 235)
this means that feature number 27 got score of 235?

Tsachi

from decision-forests.

achoum avatar achoum commented on May 18, 2024

The list of features importances and their definition is given here in the Yggdrasil user manual.

model.make_inspector().variable_importances() returns a list of tuple ([py_tree.dataspec.SimpleColumnSpec](https://www.tensorflow.org/decision_forests/api_docs/python/tfdf/inspector/SimpleColumnSpec), float) (see doc).

"data:0.33" (1; #27) is the representation of a SimpleColumnSpec object with the format `"{feature name}" (type idx, #column_idx)" (see here). The last displayed value is the variable importance value (235 in this case).

Note that different variable importances have different semantics. Unless specified, the greater the value, the most important the feature. NUM_AS_ROOT is an exemple of exception (see its definition).

Could you let me know which option I should use to get similar importance list as sklearn?

Sklean's "mean decrease in impurity" is likely close to the SUM_SCORE variable importance in.
Similarly, Sklean's "based on feature permutation" is likely close to the MEAN_DECREASE_IN_ACCURACY.

Where can I get the detailed descriptions on those options? (How to use, what they mean)

The Variable importance section of the user documentation and the model specific documentation (for example, Random Forest).

The variable_importances() method is used in both the beginner and advanced colabs. However, we have not yet published any example of use of feature importance (e.g. for feature selection).

from decision-forests.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.