Coder Social home page Coder Social logo

rmontanana / mdlp Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 2.38 MB

Discretization algorithm based on the paper by Fayyad & Irani Multi-Interval Discretization of Continuous-Valued Attributes for Classification Learning

License: MIT License

CMake 3.49% C++ 82.49% Dockerfile 0.79% Shell 3.50% Python 9.27% Makefile 0.46%

mdlp's Introduction

Build Quality Gate Status Reliability Rating

logo mdlp

Discretization algorithm based on the paper by Fayyad & Irani Multi-Interval Discretization of Continuous-Valued Attributes for Classification Learning

The implementation tries to mitigate the problem of different label values with the same value of the variable:

  • Sorts the values of the variable using the label values as a tie-breaker
  • Once found a valid candidate for the split, it checks if the previous value is the same as actual one, and tries to get previous one, or next if the former is not possible.

Other features:

  • Intervals with the same value of the variable are not taken into account for cutpoints.

  • Intervals have to have more than two examples to be evaluated (mdlp).

  • The algorithm returns the cut points for the variable.

  • The transform method uses the cut points returning its index in the following way:

      cut[i - 1] <= x < cut[i]
    

    using the std::upper_bound method

  • K-Bins discretization is also implemented, and "quantile" and "uniform" strategies are available.

Sample

To run the sample, just execute the following commands:

cmake -B build -S .
cmake --build build
build/sample/sample -f iris -m 2
build/sample/sample -h

Test

To run the tests and see coverage (llvm & gcovr have to be installed), execute the following commands:

make test

mdlp's People

Contributors

rmontanana avatar

Watchers

 avatar  avatar  avatar

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.