Giter Club home page Giter Club logo

decision-tree-model's People

Contributors

ducasse avatar evd995 avatar jecisc avatar jordanmontt avatar olekscode avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ducasse

decision-tree-model's Issues

DecisionTree, DecisionTreeModel, and RandomForest should be in three (or two) different repositories

I believe that DecisionTree can be used not only for machine learning, but also for many other applications (for example, to contain expert knowledge). So it would be nice to have it as a standalone project that lives in a separate repository.

Then there is DecisionTreeModel - a machine learning model that is used for building decision trees. This should be a separate repository can contains an abstract class DecisionTreeModel and several algorithms implemented as subclasses:

  • C4.5
  • ID3
  • etc.

DecisionTreeModel repository should depend on DecisionTree repository.

Finally, I don't remember well how RandomForest works, but if it is the ensembling algorithm that averages the output of several DecisionTreeModels, then you can put it into a separate repository and add a dependency on DecisionTreeModel.

However, if it is the kind of DecisionTreeModel that generates random decision trees and averages their outputs, then I would make it a subclass of the abstract DecisionTreeModel and keep it in the same repository.

This way we can have a clean separation and each module can be used independently.

classify: should return a DtmDecisionTreeLeaf object instead of a string label

This would allow us to ask that object to explain how the decision was made.

Example:

tennisTree := DtmDecisionTree withCondition: [ weather | weather isRaining ].

tennisTree trueChild: (DtmDecisionTreeLeaf withLabel: 'stay home').
tennisTree falseChild: (DtmDecisionTree withCondition: [ :weather |
    (weather temperature < 0) or: (weather temperature > 30) ].

tennisTree falseChild trueChild: (DtmDecisionTreeLeaf withLabel: 'stay home').
tennisThee falseChild falseChild: (DtmDecisionTreeLeaf withLabel: 'play tennis').
weather := Weather new
    raining: false;
    temperature: 42;
    yourself.
decision := tennisTree classify: weather.
decision label. "stay home"

But now we can also explain the decision:

decision why.
"
{
    [ :weather | (weather temperature < 0) or: (weather temperature > 30) ] -> true .
    [ weather | weather isRaining ] -> false
}
"

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.