Sunday, October 12, 2008

Activity 20 - Neural Networks

In this activity, we classify the same objects as with Acitivity 18 and 19. The objects classified here in this activity are vcut and pillows. The output for vcut should be 0 and for pillow should be 1.
The code is written below:

N = [2,4,1];
train = fscanfMat("F:\AP 186\act20\training.txt")';// Training Set
train = train/max(train);
t = [0 0 0 0 1 1 1 1];
lp = [2.5,0];
W = ann_FF_init(N);
T = 1000; //Training cyles
W = ann_FF_Std_online(train,t,N,W,lp,T);
test = fscanfMat("F:\AP 186\act20\data4.txt")';
test = test/max(test);
class = ann_FF_run(test,N,W)
round(class)

The result of classification is 100% successful!
0.1069949 0.0069226 0.0023741 0.0146057 0.9982912 0.5178297 0.9649571 0.9974860
Rounding off values are given by:
0 0 0 0 1 1 1 1

In this activity, I will give myself a grade of 10/10 because of very good classification of the objects.

No comments: