Function converts given model from internal structures in C++ to R's data structures.
getCoreModel(model)
Arguments
model: The model structure as returned by CoreModel.
Details
The function converts the model referenced by model from C++ internal structures to R's lists. Currently it is implemented only for random forests models.
Returns
For random forest a resulting list contains first all the information on the forest level, followed by the list of trees. For each tree the nodes are recursively nested with indication of node type (leaf or internal node) and than required information for that data type.
Author(s)
Marko Robnik-Sikonja
See Also
CoreModel, CORElearn.
Examples
# uses iris data set# build random forests model with certain parameters, # do not make too many and too large treesmodelRF <- CoreModel(Species ~ ., iris, model="rf", selectionEstimator="MDL", minNodeWeightRF=50, rfNoTrees=5, maxThreads=1)print(modelRF)# get the structure of the forest forest <- getCoreModel(modelRF)# forestdestroyModels(modelRF)# clean up