CortForest class
CortForest(
x,
p_value_for_dim_red = 0.75,
n_trees = 10,
compte_loo_weights = FALSE,
min_node_size = 1,
pseudo_data = FALSE,
number_max_dim = NULL,
verbose_lvl = 2,
force_grid = FALSE,
oob_weighting = TRUE
)
The data, must be provided as a matrix with each row as an observation.
a p_value for the localised dimension reduction test
Number of trees
Defaults to FALSE. Allows to use an automatic re-weighting of the trees in the forest, based on leave-one-out considerations.
The minimum number of observation avaliable in a leaf to initialise a split.
set to True if you are already providing data on the copula space.
The maximum number of dimension a split occurs in. Defaults to be all of the dimensions.
verbosity level : can be 0 (default) or an integer. bigger the integer bigger the output level.
boolean (default: FALSE). set to TRUE to force breakpoint to be on the n-checkerboard grid in every tree.
boolean (default : TRUE) option to weight the trees with an oob criterion (otherwise they are equally weighted)
An instance of the CortForest
S4 class. The object represent the fitted copula and can be used through several methods to query classical (r/d/p/v)Copula methods, constraint influence, etc.
Beside returning some inputted parameters, notable slots are :
trees
A list of Cort objects representing each fitted tree in the forest.
weights
The weigths of each tree.
indexes
The indexes of data points that were selected for fitting the trees
pmf
The density of each tree on data points
norm_matrix
The matrix of scalar product between trees
oob_pmf
The density of each tree on data points it did not see during fitting
oob_kl
The out-of-bag Kullback-Leibler divergence of each tree
oob_ise
The out-of-bag Integrated Square Error of each tree
More details about these slots can be found in the reference.
This class implements the bagging of CORT models, with an out-of-bag error minimisation in the weights.
See O. Laverny, V. Maume-Deschamps, E. Masiello and D. Rulli<U+00E8>re (2020) for the details of this density estimation procedure, and vignettes(package='cort')
for examples of usecases.
laverny2020cort
# NOT RUN {
(CortForest(LifeCycleSavings[,1:3],number_max_dim=2,n_trees=2))
# }
Run the code above in your browser using DataLab