Classification of Iris Data Set PDF
Classification of Iris Data Set PDF
Classification of Iris Data Set PDF
Mentor:
Assist. prof. Primo Potonik
Student:
Vitaly Borovinskiy
Ljubljana, 2009
1. Problem statement
Fishers Iris data base (Fisher, 1936) is perhaps the best known
database to be found in the pattern recognition literature. The data
set contains 3 classes of 50 instances each, where each class refers
to a type of iris plant. One class is linearly separable from the other
two; the latter are not linearly separable from each other.
The data base contains the following attributes:
1). sepal length in cm
2). sepal width in cm
3). petal length in cm
4). petal width in cm
5). class:
- Iris Setosa
- Iris Versicolour
- Iris Virginica
Fishers Iris data base is available in Matlab (load fisheriris) and in
Internet (for example, on http://archive.ics.uci.edu/ml/datasets/Iris).
The goal of the seminar is to demonstrate the process of building a
neural network based classifier that solves the classification problem.
During the seminar various neural network based approaches will be
shown, the process of building various neural network architectures
will be demonstrated, and finally classification results will be
presented.
2. Theoretical part
2.1Multilayer perceptron
Multilayer perceptron is a multilayer feedforward network.
3.1 Cross-validation
In this seminar a cross-validation procedure is applied to provide
better generalization of neural network classifiers. To perform the
cross-validation procedure input data is partitioned into 3 sets:
1) training set;
2) validation set;
3) test set.
The training set is used to train the network. The validation set is used
to validate the network, to adjust network design parameters. The
test set is used to test the generalization performance of the
selected design of neural network.
To ensure a correct comparison of different types of neural networks
the division of input data into training, validation and test sets is
performed by independent part of code (see Appendix) and the
division result is stored.
The partitioning of input data is performed randomly with a certain
ratio of input entities to be stored as training set, validation set and
test set (0.7, 0.15 and 0.15 respectively).
Fig. 1. Correct classification function for multilayer perceptron with 1 hidden layer. Blue line
training set; green line validation set
Fig. 2. Correct classification function for multilayer perceptron with 2 hidden layers (2 ortogonal
projections of surface). Training set
Fig. 3. Correct classification function for multilayer perceptron with 2 hidden layers (2 ortogonal
projections of surface). Validation set
Fig. 5. Correct classification function for radial basis function network. Blue line training set;
green line validation set
Neural networks
Radial basis
Sets of inputs Multilayer Probabilistic
function
perceptron neural network
network
training +
99.483% 99.225% 98.450%
validation
test 96.825% 100% 95.238%
4. Possible ways to improve the performance of discussed neural
networks
Neural networks
Radial basis Probabilistic
Sets of inputs Multilayer
function neural
perceptron
network network
training +
100% 99.483% 100%
validation
test 96.825% 96.825% 95.238%
This probably happens because the number of inputs is very
small and the performance of the network is very sensitive to
the way the original set is partitioned. The partitioning of original
set can also be optimized. The possible way is to divide the
original data set into a number of small sets and to search
through them for the one that ensures the best generalization
being used as validation set.
2) The principal component analysis can be applied to the
original data set to reduce its dimensionality.
2. Multilayer perceptron adjustment
While adjusting the number of neurons in hidden layers of
multilayer perceptron the results of grid search appear not
unique. For example, for a single hidden layer the plots of the
correct classification function versus number of neurons are
different each time the search is performed:
net = train(net,trainInp,T,[],[],VV);%,TV);
Y = sim(net,trainInp);
[Yval,Pfval,Afval,Eval,perfval] = sim(net,valInp,[],[],valT);
net = train(net,fintrain,finT);
finY = sim(net,fintrain);
testOut = sim(net,testInp);
testCor = 100 * length(find(testT.*testOut > 0)) / length(testT);
fprintf('Correct class = %.3f %%\n',testCor/3)
testOut = sim(net,testInp);
testCor = 100 * length(find(testT.*testOut > 0)) / length(testT);
fprintf('\nSpread = %.3f\n',spr)
fprintf('Num of neurons = %d\n',net.layers{1}.size)
fprintf('Correct class = %.3f %%\n',testCor/3)
Yval = sim(net,valInp,[],[],ind2vec(valT));
Yval = vec2ind(Yval);
testOut = sim(net,testInp);
testOut = vec2ind(testOut);
testCor = 100 * length(find(testT==testOut)) / length(testT);
fprintf('\nSpread = %.3f\n',spr)
fprintf('Num of neurons = %d\n',net.layers{1}.size)
fprintf('Correct class = %.3f %%\n',testCor)