NNREP

Neural-network report


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


NNREP generates a report of the parameters in a back-propagation neural-network segment created by NNCREAT and trained by NNTRAIN.
Back to top

Parameters


nnrep(file, dbnns)

Name Type Caption Length Value range
FILE * str Input-file name 1 -    
DBNNS * List[int] Input neural-network segment 1 - 1  

* Required parameter
Back to top

Parameter descriptions

FILE

The name of the PCIDSK image file that contains the neural-network segment.

DBNNS

The neural-network segment (type 180, BIN) on which to generate the report.

Back to top

Details

NNREP generates a report for the specified neural-network segment (DBNNS) from the input PCIDSK image file.

Neural-network segments (type 180) are created by NNCREAT and trained by NNTRAIN. NNREP examines the current state of the back-propagation neural network stored in the neural-network segment.

If the neural-network segment is created with NNCREAT, but not yet trained with NNTRAIN, some fields will display a value of Default or N/A. These fields are updated after running the first training process on the neural-network segment with NNTRAIN. A neural network that has not been trained with NNTRAIN consists of random weights in the range of -0.5 to +0.5.

Before running NNREP, NNCREAT and NNTRAIN must first be run to completion according to the descriptions in the corresponding Help topic for each. If only NNCREAT is run to completion before running NNREP, some fields will display only default values.

Back to top

Example

In the following example, a report is produced on the neural-network segment created by NNCREAT and trained by NNTRAIN.

from pci.nncreat import nncreat
from pci.nntrain import nntrain
from pci.nnrep import nnrep

file	=	"irvine.pix"
dbic	=	list(range(1, 5 + 1))
niunit	=	[]	# default, one unit per channel
nhunit	=	[]	# default, eight units in one hidden layer
dbib	=	list(range(9, 16 + 1))
valu	=	[10,20,30,40,50,60,70,80]
nsample	=	[]	# default, maximum number of samples
dbsn	=	""	# default, "neural"
dbsd	=	""	# default, blank line

dbnns = nncreat( file, dbic, niunit, nhunit, dbib, valu, nsample, dbsn, dbsd )

file	=	"irvine.pix"
# DBNNS set by NNCREAT
momen	=	[]	# default: 0.9
learn	=	[]	# default: 0.1
maxterr	=	[]	# default: 0.01
maxierr	=	[]	# default: 0.001
maxit	=	[100]	# up to 100 training iterations
ltyp	=	""	# default: "SHORT"

nntrain( file, dbnns, momen, learn, maxterr, maxierr, maxit, ltyp )

file	=	"irvine.pix"	# input file
#  dbnns set by nncreat

nnrep( file, dbnns )

The following report is generated:

  Number of learning cycles to date  :        100
  Number of samples used from        :      12195
  Max number of samples (buffer)     :      12195
  Max number of samples (bits set)   :      12195
  Normalized total error to date     :  0.1071009
  Maximum individual error to date   :  2.4291029
  Momentum rate                      :  0.9000000
  Learning rate                      :  0.1000000

  Number of units in the input layer:  5
  Hidden layer 1:                      8
  Output layer:                        8

  Input         Input       Channel Scale Range
  Channel        Units       Minimum     Maximum
  1         1 to   1     43.000000  239.000000
  2         2 to   2     13.000000  120.000000
  3         3 to   3      6.000000  166.000000
  4         4 to   4      2.000000  130.000000
  5         5 to   5      0.000000  157.000000

  Training           Output           Output
  Bitmap              Unit            Value
  9 (Water1  )        1               10
  10 (Water2  )        2               20
  11 (Urban   )        3               30
  12 (Range   )        4               40
  13 (Crop1   )        5               50
  14 (Crop2   )        6               60
  15 (Crop3   )        7               70
  16 (Forest  )        8               80

  Weights between unit 1 of hidden layer 1 and units of the input layer
  -102.304550 -56.214401 12.993260 1.702257 34.554241
  Threshold of unit 1 of hidden layer 1 is 5.448689

  :        :        :        :        :        :

  Weights between unit 8 of the output layer and units of hidden layer 1
  5.953261 -0.189555 1.195738 0.200329 -0.901565 -0.810488 -0.446700 1.588004
  Threshold of unit 8 of the output layer is -3.285881

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.