Movatterモバイル変換


[0]ホーム

URL:


packageorandforest

  1. Overview
  2. Docs

You can search for identifiers within the package.

in-package search v0.2.0

A random forest classifier based on OC4.5.

Install

Dune Dependency

Authors

Maintainers

Sources

v1.0.0.tar.gz
sha256=ecb0d2944c1a5d48f4bc6e219643e12430ec0c27b5ff2219e8e9cb55c813c8ab
md5=c4db62f8692d06e6fe0eea8f7d4d791e

Description

Random forests are an ensemble learning method for classification andregression. Random forests correct decision trees' habit of over-fittingto their training set.Cf. "Breiman, Leo, 2001. Random forests. Machine learning, 45(1), pp.5-32"for details.

Published:15 Feb 2018

README

ORandForest

A pure OCaml implementation of a random forest classifier based on OC4.5. SeeWikipedia for more information.

OC4.5 is an implementation of C4.5 that can be foundhere.

Compiling

This project usesOBuild as a compilation manager.

To sum up, in order to get the project running,

    opam install obuild  # If you don't have it yet    obuild configure    obuild build    obuild install

Documentation

You can generate the documentation by runningocamldoc. However, you can have a quick glance at thenot necessarily up-to-date precompiled documentationhere. Same goes for OC4.5here.

Basic usage example

Assuming you're using integers (if not, useOc45.FloatOc45 andORandForest.FloatRandForest or reimplement the needed functions to functorizeORandForest.ORandForest with your datatype, a basic session would look like the following

  • First generate a dataset;

    let trainSet = Oc45.IntOc45.emptyTrainSet        nbFeatures nbCategories featuresContinuity in    Oc45.IntOc45.addDataList trainDataPoints trainSet
  • then tweak the dataset to your needs;

  • then turn it into a random forest;

    let forest = ORandForest.IntRandForest.genRandomForest nbTrees trainSet in
  • then classify

    let categories = List.map        (ORandForest.IntRandForest.classify forest) testDataPoints in

Dependencies (4)

  1. parmap
  2. oc45
  3. jbuilder>= "1.0+beta7"
  4. ocaml

Dev Dependencies

None

Used by

None

Conflicts

None


[8]ページ先頭

©2009-2025 Movatter.jp