Description Usage Arguments Value Author(s) Examples
View source: R/ForestDisc_functions.R
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.
1 | Select_cont_splits(cont_splits,max_splits,opt_meth)
|
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). |
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. |
Haddouchi Maïssae
1 2 3 4 5 6 7 8 9 10 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.