public class MultiClassificationEx1 extends Object implements Serializable
Trains a 3-layer network to Fisher's iris data.
This example trains a 3-layer network using Fisher's Iris data with four continuous input attributes and three output classifications. Fisher's Iris data is perhaps the best known data set in the pattern recognition literature. Published in 1936 Fisher's paper is a classic in the field. The data set contains 3 classes of 50 instances each, where each class refers to a type of iris plant. The continuous attributes are measurements of petal length, petal width, sepal length, sepal width.
The structure of the network consists of four input nodes and three layers, with four perceptrons in the first hidden layer, three perceptrons in the second hidden layer and three in the output layer.
The four input attributes represent
The output attribute represents the class of the iris plant and are encoded using binary encoding:
With 4 inputs, 4 and 3 perceptrons in the hidden layers, and 3 perceptrons in the output
layer there are a total of 47 weights in this network, including the bias weights.
All hidden layers use the logistic activation function. Since the target
output is multi-classification the softmax activation function is used in the
output layer and the
MultiClassification
error function class is
used by the trainer. The error class MultiClassification
combines the cross-entropy error calculations and the softmax function.
Constructor and Description |
---|
MultiClassificationEx1() |
Copyright © 2020 Rogue Wave Software. All rights reserved.