caret (version 5.07-005)

avNNet.default: Neural Networks Using Model Averaging

Description

Aggregate several neural network model

Usage

## S3 method for class 'default':
avNNet(x, y, repeats = 5, bag = FALSE, ...)
## S3 method for class 'formula':
avNNet(formula, data, weights, ..., 
        repeats = 5, bag = FALSE, subset, na.action, contrasts = NULL)

## S3 method for class 'avNNet': predict(object, newdata, type = c("raw", "class", "prob"), ...)

Arguments

Value

  • For avNNet, an object of "avNNet" or "avNNet.formula". Items of interest in the output are:
  • modela list of the models generated from nnet
  • repeatsan echo of the model input
  • namesif any predictors had only one distinct value, this is a character string of the remaining columns. Otherwise a value of NULL

Details

Following Ripley (1996), the same neural network model is fit using different random number seeds. All of the resulting models are used for prediction. For regression, the output from each network are averaged. For classification, the model scores are first averaged, then translated to predicted classes. Bagging can also be used to create the models.

References

Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge.

See Also

nnet, preProcess

Examples

Run this code
data(BloodBrain)
modelFit <- avNNet(bbbDescr[, 1:10], logBBB, size = 5, linout = TRUE, trace = FALSE)
modelFit

predict(modelFit, bbbDescr[, 1:10])

Run the code above in your browser using DataCamp Workspace