Skip to main content

Random forest

RANDV

randv(Integer dim, Integer len) -> Vector of Integer
STABLE

No description.


RF:CLASSIFY

rf:classify(Bag of Decisiontree rf, Vector of Number v) -> Vector
STABLE

The predicted class belonging of v by the random forest rf.

The resulting integer is the class index with the highest probability. In the case of a tie, the lowest index is given.


RF:DECISIONTREE

rf:decisiontree(Record r) -> Decisiontree
STABLE

Convert a decision tree specified on record format

to sa.engine internal representation.


RF:DT_CLASSIFY

rf:dt_classify(Decisiontree dt, Vector v) -> Integer
STABLE

Use the Decisiontree dt to predict class belonging of v.

The resulting integer is the class index with the highest probability. In the case of a tie, the lowest index is given.


RF:DT_PREDICT

rf:dt_predict(Decisiontree dt, Vector v) -> Vector
STABLE

Use the Decisiontree dt to predict class belonging of v.

The resulting vector is the count of each class.


RF:DT_PROBABILITY

rf:dt_probability(Decisiontree dt, Vector v) -> Vector of Number
STABLE

Use the Decisiontree d to predict class belonging of v.

The resulting vector c is the probability vector where c[i] is the probability that that v belongs to class i.


RF:GENERATE_CASE_FUNCTION

rf:generate_case_function(Charstring functionname, Charstring forestname, Charstring tree_name) -> Function
STABLE

Generate a case function functionname

from the tree tree_name in the forest forestname


RF:GINI_IMPURITY

rf:gini_impurity(Bag bo) -> Real
STABLE

No description.


RF:GROW_TREES

rf:grow_trees(Bag of (Integer, Vector of Number, Integer), Integer numtrees, Integer samples_per_tree, Vector of Integer split_features) -> Decisiontree
STABLE

Convenience function for generating a random forest


RF:IMPORT_FOREST_INTO

rf:import_forest_into(Charstring dir, Charstring forestname) -> Boolean
STABLE

Import a set of tree files in directory dir into a Random Forest

named forestname. The imported trees are then available in the random_forest(Charstring forestname, Charstring treename) table.


RF:PROBABILITIES

rf:probabilities(Bag of Decisiontree rf, Vector of Number v) -> Vector of Number
STABLE

The collection of probability vectors of class belongings

from all decision trees in rf for v.


RF:PROBABILITY

rf:probability(Bag of Decisiontree rf, Vector of Number v) -> Vector of Number
STABLE

The average probability vector of class belongings

from all decision trees in rf for v.


RF:RANDOM_FOREST

rf:random_forest(Charstring forestname) -> Bag of Decisiontree
STABLE

Helper function to obtain all trees in a forest forestname


RF:RANDOM_FOREST_TREE

rf:random_forest_tree(Charstring forestname, Charstring treename) -> Decisiontree
STABLE

The global table containing random forests.

Each forest has a name forestname Each tree in the forest has a name treename


RF:RANDOM_SUBSET

rf:random_subset(Bag of (Integer, Vector of Number, Integer), Integer num)->(Integer id, Vector of Number v, Integer c)
STABLE

Draw num points uniformly random from the bag dp


RF:RECORD

rf:record(Decisiontree dt) -> Record
STABLE

Convert a decision tree to record.