Select_cont_splits {ForestDisc}R Documentation

Internal function: Continuous cut points Selection

Description

Build the optimal set of cut points C for discretization, based on moment matching. The set of split points S extracted through Extract_cont_splits() function is mapped to a reduced set of cut points C.

Usage

Select_cont_splits(cont_splits,max_splits,opt_meth)

Arguments

cont_splits

Output of the function Extract_cont_splits().

max_splits

Maximum number of cut points allowed. Possible values range between 2 and 10. Default value = 10.

opt_meth

The non-linear optimization algorithm to use in order to get the optimal set of cut points matching as well as possible the set of split points. The possible values are DIviding RECTangles algorithm "directL", NelderMead Simplex method "NelderMead", Sequential Least-Squares Quadratic Programming "SLSQP". (more details about these non-linear optimization algorithms can be found in the documentation of the "NLopt" library).

Value

List with 2 components:

All_splits

Data frame of solutions returned for k values ranging from 2 to 'max_splits'.

Selected_splits

Data frame of the best solution returned.

Author(s)

Haddouchi Maïssae

Examples

data(iris)
Mydata=iris
id_target=5
set.seed(1234)
X=Mydata[,1:(id_target-1)]
Y=Mydata[,id_target]
ntree=50
RFTREES=RF2Selectedtrees(X,Y,ntree)
RFCONTSPLITS=Extract_cont_splits(RFTREES)
RFSELECTCONTSPLITS=Select_cont_splits(cont_splits=RFCONTSPLITS,max_splits=10,opt_meth="NelderMead")

[Package ForestDisc version 0.1.0 Index]