pcaNNet.default

0th

Percentile

Neural Networks with a Principal Component Step

Run PCA on a dataset, then use it in a neural network model

Keywords
neural
Usage
## S3 method for class 'default':
pcaNNet(x, y, thresh = 0.99, ...)
## S3 method for class 'formula':
pcaNNet(formula, data, weights, ..., 
        thresh = .99, subset, na.action, contrasts = NULL)

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

Details

The function first will run principal component analysis on the data. The cumulative percentage of variance is computed for each principal component. The function uses the thresh argument to determine how many components must be retained to capture this amount of variance in the predictors.

The principal components are then used in a neural network model.

When predicting samples, the new data are similarly transformed using the information from the PCA analysis on the training data and then predicted. Because the variance of each predictor is used in the PCA analysis, the code does a quick check to make sure that each predictor has at least two distinct values. If a predictor has one unique value, it is removed prior to the analysis.

Value

  • For pcaNNet, an object of "pcaNNet" or "pcaNNet.formula". Items of interest in the output are:
  • pcthe output from preProcess
  • modelthe model generated from nnet
  • namesif any predictors had only one distinct value, this is a character string of the remaining columns. Otherwise a value of NULL

References

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

See Also

nnet, preProcess

Aliases
Examples
data(BloodBrain)
modelFit <- pcaNNet(bbbDescr[, 1:10], logBBB, size = 5, linout = TRUE, trace = FALSE)
modelFit

predict(modelFit, bbbDescr[, 1:10])
Documentation reproduced from package caret, version 5.07-001, License: GPL-2

Community examples

Looks like there are no examples yet.