Neural Networks Using Model Averaging
Aggregate several neural network model
## 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"), ...)
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.
avNNet, an object of
"avNNet.formula". Items of interest in the output are:
model a list of the models generated from
repeats an echo of the model input names if any predictors had only one distinct value, this is a character string of the remaining columns. Otherwise a value of
Ripley, B. D. (1996) Pattern Recognition and Neural Networks. Cambridge.
data(BloodBrain) modelFit <- avNNet(bbbDescr[, 1:10], logBBB, size = 5, linout = TRUE, trace = FALSE) modelFit predict(modelFit, bbbDescr[, 1:10])