package orandforest

  1. Overview
  2. Docs

Module ORandForest.FloatRandForestSource

Sourcetype randomForest

Stores a random forest generated by genRandomForest

Sourceval genRandomForest : ?ncores:int -> int -> c45_trainSet -> randomForest

genRandomForest nbTrees trainSet generates a random forest of nbTrees trees, based on trainSet. If ncores > 1 is given, the random forest will be built in parallel

Classifies a new data vector, relying on the informations from the given random forest (generated by genRandomForest), yielding a category.

Sourceval classify_raw : randomForest -> c45_data -> (c45_category * float) list

Like classify but gives access to the percentage of votes for each category. After calibration of your classifier (e.g. using Platt/sigmoid scaling or isotonic regression), those percentages can be converted to probabilities. No calibration method is included in the library currently.

Sourceval save_to_file : string -> randomForest -> unit

save_to_file output model saves the random forest model into the file output.

Sourceval restore_from_file : string -> randomForest

restore_from_file input restores the random forest that was previously saved in file input.