GithubHelp home page GithubHelp logo

yrh1994 / decision-tree Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jieweiwei/decision-tree

0.0 2.0 0.0 172 KB

使用决策树对数据集进行分类

License: Apache License 2.0

Makefile 2.19% C++ 97.81%

decision-tree's Introduction

Decision-Tree

使用决策树对数据集进行分类

##开发平台

Ubuntu Kylin 14.04

##运行程序

在终端进入项目目录,输入:

$ make -- 编译程序

$ ./main -- 运行程序

$ ./main test -- 计算决策树的准确率

##输入输出说明

data/dataset.txt -- 决策树的数据集合,前100条记录用于训练模型,后面的数据用于预测并验证

data/correctResult.txt -- 数据的真实结果

data/predictions.txt -- 决策树的预测结果

##数据集描述

  1. Title: 1984 United States Congressional Voting Records Database

  2. Source Information: (a) Source: Congressional Quarterly Almanac, 98th Congress, 2nd session 1984, Volume XL: Congressional Quarterly Inc. Washington, D.C., 1985. (b) Donor: Jeff Schlimmer ([email protected]) (c) Date: 27 April 1987

  3. Past Usage

    • Publications
      1. Schlimmer, J. C. (1987). Concept acquisition through representational adjustment. Doctoral dissertation, Department of Information and Computer Science, University of California, Irvine, CA. -- Results: about 90%-95% accuracy appears to be STAGGER's asymptote
      • Predicted attribute: party affiliation (2 classes)
  4. Relevant Information: This data set includes votes for each of the U.S. House of Representatives Congressmen on the 16 key votes identified by the CQA. The CQA lists nine different types of votes: voted for, paired for, and announced for (these three simplified to yea), voted against, paired against, and announced against (these three simplified to nay), voted present, voted present to avoid conflict of interest, and did not vote or otherwise make a position known (these three simplified to an unknown disposition).

  5. Number of Instances: 435 (267 democrats, 168 republicans)

  6. Number of Attributes: 16 + class name = 17 (all Boolean valued)

  7. Attribute Information:

    1. Class Name: 2 (democrat, republican)
    2. handicapped-infants: 2 (y,n)
    3. water-project-cost-sharing: 2 (y,n)
    4. adoption-of-the-budget-resolution: 2 (y,n)
    5. physician-fee-freeze: 2 (y,n)
    6. el-salvador-aid: 2 (y,n)
    7. religious-groups-in-schools: 2 (y,n)
    8. anti-satellite-test-ban: 2 (y,n)
    9. aid-to-nicaraguan-contras: 2 (y,n)
  8. mx-missile: 2 (y,n)

  9. immigration: 2 (y,n)

  10. synfuels-corporation-cutback: 2 (y,n)

  11. education-spending: 2 (y,n)

  12. superfund-right-to-sue: 2 (y,n)

  13. crime: 2 (y,n)

  14. duty-free-exports: 2 (y,n)

  15. export-administration-act-south-africa: 2 (y,n)

  16. Missing Attribute Values: Denoted by "?"

    NOTE: It is important to recognize that "?" in this database does not mean that the value of the attribute is unknown. It means simply, that the value is not "yea" or "nay" (see "Relevant Information" section above).

    Attribute: #Missing Values: 1: 0 2: 0 3: 12 4: 48 5: 11 6: 11 7: 15 8: 11 9: 14 10: 15 11: 22 12: 7 13: 21 14: 31 15: 25 16: 17 17: 28

  17. Class Distribution: (2 classes)

    1. 45.2 percent are democrat
    2. 54.8 percent are republican

decision-tree's People

Contributors

jieweiwei avatar

Watchers

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