All Projects → bowbowbow → DecisionTree

bowbowbow / DecisionTree

Licence: MIT License
c++ implementation of decision tree algorithm

Programming Languages

C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to DecisionTree

aws-machine-learning-university-dte
Machine Learning University: Decision Trees and Ensemble Methods
Stars: ✭ 119 (+357.69%)
Mutual labels:  decision-trees
QuantumForest
Fast Differentiable Forest lib with the advantages of both decision trees and neural networks
Stars: ✭ 63 (+142.31%)
Mutual labels:  decision-trees
Pac-Man
Evolutionary Pac-Man bots using Grammatical Evolution and Multi-objective Optimization. Cool GUI included (Undergraduate Thesis)
Stars: ✭ 50 (+92.31%)
Mutual labels:  decision-trees
IBM-final-project-Machine-Learning
Final project of IBM's course https://www.coursera.org/learn/machine-learning-with-python on coursera
Stars: ✭ 33 (+26.92%)
Mutual labels:  decision-trees
Amazon-Fine-Food-Review
Machine learning algorithm such as KNN,Naive Bayes,Logistic Regression,SVM,Decision Trees,Random Forest,k means and Truncated SVD on amazon fine food review
Stars: ✭ 28 (+7.69%)
Mutual labels:  decision-trees
MLDay18
Material from "Random Forests and Gradient Boosting Machines in R" presented at Machine Learning Day '18
Stars: ✭ 15 (-42.31%)
Mutual labels:  decision-trees
ProtoTree
ProtoTrees: Neural Prototype Trees for Interpretable Fine-grained Image Recognition, published at CVPR2021
Stars: ✭ 47 (+80.77%)
Mutual labels:  decision-trees
cortana-intelligence-customer360
This repository contains instructions and code to deploy a customer 360 profile solution on Azure stack using the Cortana Intelligence Suite.
Stars: ✭ 22 (-15.38%)
Mutual labels:  decision-trees
IPL-ML-2018
Predicting IPL match results. https://kuharan.github.io/IPL-ML-2018/
Stars: ✭ 14 (-46.15%)
Mutual labels:  decision-trees
Breast-Cancer-Scikitlearn
simple tutorial on Machine Learning with Scikitlearn
Stars: ✭ 33 (+26.92%)
Mutual labels:  decision-trees
yggdrasil-decision-forests
A collection of state-of-the-art algorithms for the training, serving and interpretation of Decision Forest models.
Stars: ✭ 156 (+500%)
Mutual labels:  decision-trees
Encoder-Forest
eForest: Reversible mapping between high-dimensional data and path rule identifiers using trees embedding
Stars: ✭ 22 (-15.38%)
Mutual labels:  decision-trees
lleaves
Compiler for LightGBM gradient-boosted trees, based on LLVM. Speeds up prediction by ≥10x.
Stars: ✭ 132 (+407.69%)
Mutual labels:  decision-trees
Machine Learning From Scratch
Machine Learning models from scratch with a better visualisation
Stars: ✭ 15 (-42.31%)
Mutual labels:  decision-trees
df-dn-paper
Conceptual & empirical comparisons between decision forests & deep networks
Stars: ✭ 14 (-46.15%)
Mutual labels:  decision-trees
supervised-machine-learning
This repo contains regression and classification projects. Examples: development of predictive models for comments on social media websites; building classifiers to predict outcomes in sports competitions; churn analysis; prediction of clicks on online ads; analysis of the opioids crisis and an analysis of retail store expansion strategies using…
Stars: ✭ 34 (+30.77%)
Mutual labels:  decision-trees
statemachine-go
🚦 Declarative Finite-State Machines in Go
Stars: ✭ 47 (+80.77%)
Mutual labels:  decision-trees
linear-tree
A python library to build Model Trees with Linear Models at the leaves.
Stars: ✭ 128 (+392.31%)
Mutual labels:  decision-trees
aifad
AIFAD - Automated Induction of Functions over Algebraic Data Types
Stars: ✭ 27 (+3.85%)
Mutual labels:  decision-trees
AdaptiveRandomForest
Repository for the AdaptiveRandomForest algorithm implemented in MOA 2016-04
Stars: ✭ 28 (+7.69%)
Mutual labels:  decision-trees

Decision Tree Assignment

C++ Implementation of Decision Tree Algorithm

To run the implementation

  1. Keep project files in one folder.

  2. Compile using command make.

To compile without using the makefile, type the following command.

g++ -std=c++11 decision_tree.cpp -o dt.exe

(Note that -std=c++11 option must be given in g++.)

  1. Run using following command.

./dt.exe [dt_train.txt] [dt_test.txt] [dt_result.txt]

Summary of the algorithm

This algorithm is used for automatic decision tree generation.

Input:

  1. Data partition: D, which is a set of training tuples and their associated class labels.
  2. Attribute_list: The set of candidate attributes
  3. Attribute_selection_method: A procedure to determine the splitting criterion that "best" partitions the data tuples into individual classes. This criterion consists of a splitting_attribute and, possibly, either a split-point or splitting subset.

Output: A decision tree.

Basic Algorithm (a greedy algorithm)

  • Tree is constructed in a top-down, recursive, divide-and-conquer manner.
  • At start, all the training examples are at the root.
  • Attributes are categorical. (Note that if continuous-valued, they are discretized in advance)
  • Test attributes are selected on the basis of a heuristic or statistical measure.

Conditions for stopping partitioning

  • All samples for a given node belong to the same class
  • There are no remaining attributes for further partitioning - majority voting is employed for classifying the leaf
  • There are no sample left

Attribute Selection Measure : Information GainRatio

Any other specification of the implementation and testing

  • Note that I use c++11, not c++. therefore -std=c++11 option is must be given in g++.

  • self test result

Gain Accuracy: 91.0405%(315/346)

Gain ratio Accuracy: 91.9075%(318/346)

Estimated error pruning with gain ratio Accuracy: 67.9191%(235/346)

Simple pre-pruning rule based on majority heuristic with gain ratio Aaccuracy: 92.1965%(319/346)

About input file

Input file format for a training set

[attribute_name_1]\t[attribute_name_2]\n...[attribute_name_n]

[attribute_1]\t[attribute_2]\t...[attribute_n]\n

[attribute_1]\t[attribute_2]\t...[attribute_n]\n

  • n-1 attribute values of the corresponding tuple
  • All the attributes are categorical (not continuous-valued)
  • [attribute_n]: a class label that the corresponding tuple belongs to

Input file format for a test set

[attribute_name_1]\t[attribute_name_2]\n...[attribute_name_n-1]

[attribute_1]\t[attribute_2]\t...[attribute_n-1]\n

[attribute_1]\t[attribute_2]\t...[attribute_n-1]\n

  • n-1 attribute values of the corresponding tuple
  • All the attributes are categorical (not continuous-valued)

About output file

Output file format

[attribute_name_1]\t[attribute_name_2]\n...[attribute_name_n]

[attribute_1]\t[attribute_2]\t...[attribute_n]\n

[attribute_1]\t[attribute_2]\t...[attribute_n]\n

  • [attribute_1] ~ [attribute_n-1]: given attribute values in the test set
  • [attribute_n]: a class label predicted by your model for the corresponding tuple
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].