GithubHelp home page GithubHelp logo

27arjunbali / decision-trees-for-ml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from serengil/decision-trees-for-ml

0.0 1.0 0.0 351 KB

Building Decision Trees From Scratch In Python

Home Page: https://sefiks.com/tag/decision-tree/

Jupyter Notebook 91.70% Python 8.30%

decision-trees-for-ml's Introduction

Decision Trees for Machine Learning

This is the repository of Decision Trees for Machine Learning online course published on Udemy. In this course, the following algorithms will be covered. All project is going to be developed on Python (3.6.4), and neither out-of-the-box library nor framework will be used to build decision trees.

Course: https://www.udemy.com/decision-trees-for-machine-learning/?couponCode=DTML-BLOG-18 (90% OFF over the regular price)

1- ID3 - Documentation

2- C4.5 - Documentation

3- CART (Classification And Regression Trees) - Documentation

4- Regression Trees (CART for regression) - Documentation

5- Random Forest - Documentation

6- Gradient Boosting Decision Trees - Documentation 1, Documentation 2

7- Adaboost - Documentation

Just call the decision.py file to run the program. You might want to change the running algorithm. You just need to set algorithm variable.

algorithm = "ID3" #Please set this variable to ID3, C4.5, CART or Regression

Moreover, you might want to apply random forest. Please set this to True in this case.

enableRandomForest = False

Furthermore, you can apply gradient boosting regression trees.

enableGradientBoosting = True

Besides, adaptive boosting is allowed to run

enableAdaboost = True

Finally, you can change the data set to build different decision trees. Just pass the file name, and its column names if it does not exist.

df = pd.read_csv("car.data"
  #column names can either be defined in the source file or names parameter in read_csv command
  ,names=["buying","maint","doors","persons","lug_boot","safety","Decision"] 
)

Prerequisites

Pandas and numpy python libraries are used to load data sets in this repository. You might run the following commands to install these packages if you are going to use them first time.

pip install pandas
pip install numpy

Updates

To keep yourself up-to-date you might check posts in my blog about decision trees

decision-trees-for-ml's People

Contributors

serengil avatar

Watchers

James Cloos 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.