| Did you know ... | Search Documentation: |
| Pack logtalk -- logtalk-3.100.1/docs/handbook/_sources/libraries/random_forest_regression.rst.txt |
.. _library_random_forest_regression:
random_forest_regression
Random Forest regressor supporting continuous and mixed-feature
datasets. The library implements the regressor_protocol defined in
the regression_protocols library and learns an ensemble of
regression trees trained on bootstrap samples and per-split random
feature subsets, predicting with the arithmetic mean of the individual
tree predictions.
Open the `../../apis/library_index.html#random_forest_regression <../../apis/library_index.html#random_forest_regression>`__ link in a web browser.
To load this library, load the loader.lgt file:
::
| ?- logtalk_load(random_forest_regression(loader)).
To test this library predicates, load the tester.lgt file:
::
| ?- logtalk_load(random_forest_regression(tester)).
To run the performance benchmark suite, load the
tester_performance.lgt file:
::
| ?- logtalk_load(random_forest_regression(tester_performance)).
fast_random(xoshiro128pp) so
bootstrap and split-level feature sampling are portable and
reproducible.The learned regressor is represented by default as:
rf_regressor(Trees, Diagnostics)
The exported predicate clauses therefore use the shape:Functor(Trees, Diagnostics)The diagnostics/2 predicate returns a list of metadata terms with the form:
::
[
model(random_forest_regression),
target(Target),
training_example_count(TrainingExampleCount),
options(Options),
attribute_count(AttributeCount),
tree_count(TreeCount)
]
Where:
model(random_forest_regression) identifies the learning algorithm
that produced the regressor.target(Target) stores the target attribute name declared by the
training dataset.training_example_count(TrainingExampleCount) stores the number of
examples used during training.options(Options) stores the effective learning options after
merging the user options with the library defaults.attribute_count(AttributeCount) stores the number of dataset
attributes available to the ensemble before split-level subsampling.tree_count(TreeCount) stores the number of trained regression
trees in the ensemble.
Use the regression_protocols diagnostic/2 and
regressor_options/2 helper predicates when you only need a single
metadata term or the effective options.
The learn/3 predicate accepts the following options:
10.all. When omitted, the
library uses the square root of the total number of available
attributes, with a minimum of one attribute. Passing all disables
split-level attribute subsampling.10.1.0.0.true and false. The default is false.fast_random(xoshiro128pp) pseudo-random generator when drawing
bootstrap samples and split-level random feature subsets. Using the
same seed with the same dataset and options reproduces the same
learned regressor. The default is 1357911.