Learn R Programming

hann (version 1.2)

predict.hann1: Prediction

Description

Classification of patterns with Hopfield-based artificial neural networks.

Usage

# S3 method for hann1
predict(object, patterns, rawsignal = TRUE,
        useLabels = TRUE, ...)
# S3 method for hann3
predict(object, patterns, rawsignal = TRUE,
        useLabels = TRUE, ...)

Value

If rawsignal = TRUE a matrix; if rawsignal = FALSE a vector.

Arguments

object

an object of class "hann1" or "hann3".

patterns

the patterns to be classified.

rawsignal

a logical value (see details).

useLabels

a logical value whether to use the labels of the classes (if any) as colnames of the predictions.

...

(unused).

Details

The patterns have to be coded in the same way than the matrix xi used to train the networks.

If rawsignal = TRUE, the raw signal of each neuron is output for each pattern. Otherwise, a classification of each pattern is done by finding the neuron with the largest signal.

See Also

hann1, hann3