Learn R Programming

CORElearn (version 0.9.29)

destroyModels: Destroy single or all CORElearn models

Description

Destroys internal representation of a given model or all constructed models. As side effect the memory used by the model(s) is freed.

Usage

destroyModels(model=NULL)

Arguments

model
The model structure as returned by CoreModel. The default value of NULL represents all generated models.

Value

  • There is no return value.

Details

The function destroys the model structure as returned by CoreModel. Subsequent work with this model is no longer possible. If parameter model=NULL (default value) all generated models are destroyed and memory used by their internal representation is freed.

See Also

CORElearn, CoreModel.

Examples

Run this code
# use iris data set

# build random forests model with certain parameters
model <- CoreModel(Species ~ ., iris, model="rf", 
              selectionEstimator="MDL",minNodeWeight=5,rfNoTrees=100)

# prediction 
pred <- predict.CoreModel(model, iris, rfPredictClass=FALSE)
print(pred)

# destruction of model's internal representation
destroyModels(model)

Run the code above in your browser using DataLab