Giter Club home page Giter Club logo

cart's Introduction

Classification and Regression Trees

This software uses regression trees inside a Random Forest to classify matrices of data. There are two versions of the software: a Python version in the python folder. There is a C++ version which is faster and more accurate in the root folder. Both versions employ parallel programming and run in multiple threads or processes.

Running the program

To run the program, use the following parameters: ./randomForest -t training_file -c data_to_classify -p 16 -n 1000 -f 30 -m 0.1

Required Parameters

  • -t training_file
    • input matrix file to train trees
  • -s filename to write soft labels
    • output of softlabels for output to AUPR program

Optional Parameters

  • -p 16
    • use 16 threads in a thread pool to process trees
  • -n 1000
    • use 1000 trees in the forest
  • -f 30
    • use a subset of 30 features for each tree
  • -g 0.1
    • minimum gain of sum of squares to continue splitting
    • gain = sum_of_squares - (left_squares + right_squares)
  • -m

Class Descriptions

  • Matrix - 2d double data structure with utility functions
  • Classifier - Base class for all classifiers
    • TreeNode - Individual node for a regression tree including the root node.
    • Forest - Single-threaded Regression Forest Classifier
      • ParallelForest - Multi-threaded training using thread pools

Other Code Files

  • main.cpp - main function and argument processing
  • stats.cpp/hpp - statistical functions (mean, mode, variance, regression, etc.)
  • util.cpp/hpp - utility functions similar to Python's built-ins
  • pthread_pool.c/h - thread pool C code from the Internet

TODO

Migrate away from c thread_pool code.  Redo the code in an object-oriented manner.

cart's People

Contributors

reardan avatar wreardan avatar

Watchers

 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.