GithubHelp home page GithubHelp logo

how to get feature_importance about chaid HOT 5 CLOSED

rambatino avatar rambatino commented on September 18, 2024
how to get feature_importance

from chaid.

Comments (5)

Rambatino avatar Rambatino commented on September 18, 2024

Ideally this library should implement all of these: https://towardsdatascience.com/the-mathematics-of-decision-trees-random-forest-and-feature-importance-in-scikit-learn-and-spark-f2861df67e3

They're also not hard to do, you just need the time, which I don't really have at the moment. Feel free to submit a PR, there's a decent example here: https://github.com/Rambatino/CHAID/blob/master/CHAID/tree.py#L284

from chaid.

yokoshin avatar yokoshin commented on September 18, 2024

I don't think It's difficult to impl feature importance.
My understanding is that feature importance is calculated based on some index like gini or entropy.
Do you know which index CHAID in SPSS use?

from chaid.

Rambatino avatar Rambatino commented on September 18, 2024

I don't unfortunately, haven't looked at this stuff in a while since the repo hit maturity. There's a PDF somewhere that breaks down the calculations, I couldn't find it just now, but it shouldn't be too difficult to track down

from chaid.

yokoshin avatar yokoshin commented on September 18, 2024

chefboost uses chi-square values.
https://github.com/serengil/chefboost/blob/master/chefboost/training/Training.py#L164

from chaid.

Rambatino avatar Rambatino commented on September 18, 2024

yeah seems simple enough. Feel free to submit a PR

from chaid.

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.