tfdf.builder.RandomForestBuilder

Random Forest model builder.

Inherits From: AbstractDecisionForestBuilder, AbstractBuilder

Used in the notebooks

Used in the tutorials

dataspec Dataspec, possibly partially constructed.

Can be called before close for advanced model edition.

objective Objective of the model.

Methods

add_tree

View source

Adds one tree to the model.

check_leaf

View source

Called on all the leaf nodes during the export.

check_non_leaf

View source

Called on all the non-leaf nodes during the export.

close

View source

Finalize the builder work.

This method should be called last.

get_dictionary

View source

Gets the dictionary of a categorical(-set) string feature.

model_type

View source

Unique key describing the type of the model.

observe_feature

View source

Register a feature and some of its possible value.

Generally, users don't need to call this function. An example of advanced exception is if a model does not refer to a specific possible categorical value, and if this value should be treated differently than out-of-vocabulary values.

Should be called at least once on each of the model input features. If called multiple times with categorical_values the set of possible values will be the union of the categorical_valuess.

Args
feature Definition of the feature.
categorical_values Set of observed values. Only for categorical-like features.

set_dictionary

View source

Sets the dictionary of a categorical or categorical-set column.

specialized_header

View source

Gets the specialized header of the model.

specialized_header_filename

View source

Gets the filename of the specialized header.

yggdrasil_model_path

View source

Gets the path to the destination yggdrasil model.