package orandforest
-
orandforest
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type c45_data = Oc45.IntOc45.data
type c45_category = Oc45.IntOc45.category
type c45_trainSet = Oc45.IntOc45.trainSet
Stores a random forest generated by genRandomForest
val 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
val classify : randomForest -> c45_data -> c45_category
Classifies a new data vector, relying on the informations from the given random forest (generated by genRandomForest
), yielding a category.
val 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.
val save_to_file : string -> randomForest -> unit
save_to_file output model
saves the random forest model
into the file output
.
val restore_from_file : string -> randomForest
restore_from_file input
restores the random forest that was previously saved in file input
.