Code Monkey home page Code Monkey logo

decision-tree-id3's Introduction

DecisionTreeID3

Machine Learning Algorithm ID3 of Decision Tree( java )

代码

1. DecisionTree.java 决策树的数据结构

不像python中有一个功能比较强大的字典,所以这里自定义了一个决策树的数据结构(类DecisionTree),两个域:

  1. String:用来表示该树(子树)的属性(feature)。
  2. HashMap<String, Object> : key的值表示feature的取值,Object是子树(DecisionTree)或者是最终的label。 典型的一个递归的定义。并且在该类中提供了:
  3. 遍历树的方法。
  4. 将构造的树输出到指定的文件中。

2. ID3.java

ID3算法实现

3. IOOperation.java

用于读取训练集等数据。

4. Football.java

利用决策树算法来决定要不要出去踢球。

5. Lenses.java

利用决策树算法来决定适合什么类型的隐形眼镜

6. Mnist.java

计算决策树算法在手写字数据MNISI上的表现

7. PretreatMNIST.java

对数据集MNIST的预处理


数据

MNIST.c:从网络上下载的原始数据 42000 数据的格式为 label+feature
MNISTDecisionTree.c:将MNIST.c处理为feature+label
MNIST01DecisionTree.c:将MNISTDecisionTree.c进行二值处理,非0的数据都设置为1
minMNISTDecisionTree.c:MNISTDecisionTree.c的十分之一
minisoPorbe.data:minMNISTDecisionTree.c产生的训练集合
minisoTraining.data:minMNISTDecisionTree.c产生的测试集合
MNISTtree.data:MNIST数据产生的决策树的构造规则

详细介绍

decision-tree-id3's People

Contributors

xusshuai avatar

Watchers

 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.