Ann

From Eigenvector Research Documentation Wiki
Revision as of 23:20, 18 November 2013 by imported>Donal
Jump to navigation Jump to search

Purpose

Predictions based on Artificial Neural Network (ANN) regression models.

Synopsis

[model] = ann(x,y,options);
[ypred] = ann(x,model,options);
[ypred] = ann(x,y,model,options);
[ypred] = ann(x,y, xt,yt, options);

Description

Build an ANN model from input X and Y block data using the specified number of layers and layer nodes. Alternatively, if a model is passed in ANN makes a Y prediction for an input test X block. The ANN model contains quantities (weights etc) calculated from the calibration data. If a model structure is passed in then these do not have to be re-calculated. The ANN is a Feedforward ANN with Resilient Backpropagation training. See Rprop for further details. ANN is implemented using the Encog framework Encog provided by Heaton Research, Inc, under the Apache 2.0 license. Further details of Encog Neural Network features are available at Encog Documentation

When building an ANN model the training will terminate whenever either a) time exceeds option 'maxseconds', or b) RMSE becomes smaller than option 'terminalrmse', or c) the rate of improvement of RMSE per 100 iterations becomes less than option 'terminalrmserate'. Note these RMSE values refer to the internal preprocessed and scaled y values.

Options

options = a structure array with the following fields:

  • display : [ 'off' |{'on'}] Governs display
  • plots: [ {'none'} | 'final' ] governs plotting of results, and
  • waitbar : [ 'off' |{'auto'}| 'on' ] governs use of waitbar during analysis. 'auto' shows waitbar if delay will likely be longer than a reasonable waiting period.
  • anntype : [{1} | 2] Number of hidden layers.
  • nhid1 : [{2}] Number of nodes in first hidden layer.
  • nhid2 : [{0}] Number of nodes in second hidden layer.
  • maxseconds : [{20}] Maximum duration of ANN training (seconds).
  • terminalrmse : [0.05] Termination RMSE value for ANN iterations (RMSE of scaled y).
  • terminalrmserate : [1.e-9] Termination rate of change of RMSE per 100 iterations.
  • preprocessing: {[] []} preprocessing structures for x and y blocks (see PREPROCESS).
  • compression: [{'none'}| 'pca' | 'pls' ] type of data compression to perform on the x-block prior to calculaing or applying the ANN model. 'pca' uses a simple PCA model to compress the information. 'pls' uses a pls model. Compression can make the ANN more stable and less prone to overfitting.
  • compressncomp: [1] Number of latent variables (or principal components to include in the compression model.
  • blockdetails: [ {'standard'} | 'all' ], extent of predictions and residuals included in model, 'standard' = only y-block, 'all' x- and y-blocks.

See Also

modelselector