Giter Club home page Giter Club logo

c4.5's Introduction

C4.5

C4.5 Algorithm uses Entropy and Information Gain Ratio measures to analyse categorical and numerical data. The function returns: 1) The decision tree rules. 2) The total number of rules.

  • Xdata = Dataset Attributes

  • ydata = Dataset Target

  • cat_missing = "none", "missing", "most", "remove" or "probability". If "none" is selected then nothing will be done if there are missing categorical values. If "missing" is selected then the missing categorical values will be replaced by a new category called Unkown. If "most" is selected then the categorical missing values will be replaced by the most popular category of the attribute. If "remove" is selected then the observation with missing categorical values will be deleted from the dataset. If "probability" is selected then the categorical missing values will be randomly replaced by a category based on the category distribution of the attribute.

  • num_missing = "none", "mean", "median", "remove" or "probability". If "none" is selected then nothing will be done if there are missing numerical values. If "mean" is selected then the missing numerical values will be replaced by the attribute mean. If "median" is selected then the numerical missing values will be replaced by the attribute median. If "most" is selected then the numerical missing values will be replaced by the most popular value of the attribute. If "remove" is selected then the observation with missing numerical values will be deleted from the dataset. If "probability" is selected then the numerical missing values will be randomly replaced by a value based on the numerical distribution of the attribute.

  • pre_pruning = "none", "chi_2", "impur" or "min". If "none" is selected then no pruning is performed. If "chi_2" is selected then a pre-pruning method based on a Chi Squared test is performed, if the table is in the 2x2 format and has less than 10,000 examples then a Fisher Exact test is performed instead. If "impur" is selected then a pre-pruning method is performed, pruning child nodes that do not improve the impurity from its father node. if "min" is selected then a node must have a minimum quantity of data examples to avoid pruning.

  • chi_lim = 0.1. Chi Squared limit (p-value) to prune a node. Only relevant if pre_pruning = "chi_2".

  • min_lim = 5. Minimum quantity of data examples that a node should have to avoid pruning. Values lower than this limit makes a node to be pruned. Only relevant if pre_pruning = "min".

  • Finnaly a prediction function - prediction_dt_c45( ) - is also included.

Acknowledgement

This section is dedicated to all the people that helped to improve or correct the code. Thank you very much!

  • Patrick Eiselt (26.FEBRUARY.2019) - Germany

c4.5's People

Contributors

valdecy 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.