1. Home
  2. NNDISPLAY directive

NNDISPLAY directive

Displays output from a multi-layer perceptron neural network fitted by NNFIT.

Option

PRINT = string tokens Controls fitted output (description, estimates, fittedvalues, summary); default desc, esti, summ

Parameter

pointers Save structure with details of the network and the estimated parameters

Description

NNDISPLAY displays results from the fit of a neural network by NNFIT. The type of neural network fitted by NNFIT is a fully-connected feed-forward multi-layer perceptron with a single hidden layer. This network starts with a row of nodes, one for each input variable (i.e. x-variate), which are all connected to every node in the hidden layer. The nodes in the hidden layer are then all connected to the output node in the final, output layer.

Details of the fit and the structure of the neural network can be supplied using the parameter of NNDISPLAY. This must have been saved using the SAVE parameter of NNFIT. If this is not set, the output is from the most recent network fitted by NNFIT.

The output is controlled by the PRINT option, with settings:

    description a description of the network (number of input variables, nodes etc.),
    estimates estimates of the free parameters,
    fittedvalues fitted values,
    summary summary (numbers of iterations, objective function etc.).

Option: PRINT.

Parameter: unnamed.

See also

Directives: NNFIT, NNPREDICT.

Commands for: Data mining.

Example

" Example NNDI-1: Displays output from a multi-layer perceptron neural network 
 fitted by NNFIT."

" This example prints the fitted values after using NNFIT to fit a multi-layer 
  perceptron neural network with five hidden layers, a hyperbolic activation 
  function in the hidden layer and a linear activation function in the output 
  layer."

" The data are in a file called iris.GSH and contain the data from Fisher's
  Iris data set."

SPLOAD   [PRINT=*] '%GENDIR%/Data/iris.GSH' 
POINTER  [VALUES=Sepal_Length,Sepal_Width,Petal_Length,Petal_Width] Measures
CALC     yval = NEWLEVELS(Species)
NNFIT    [PRINT=description,estimates,summary; NHIDDEN=5;\ 
          HIDDENMETHOD=hyperbolictangent; OUTPUTMETHOD=linear; SEED=12]\ 
           Y=yval; X=Measures
NNDISPLAY [PRINT = fitt] 
Updated on March 7, 2019

Was this article helpful?