MATLAB: Writing mistake using GRNN or NEWFF

classificationnewffnewgrnnregression

Hi all, I have been working on training neural network on 3 alphabets (A,B, C) for the system which could be able to identify the mistakes in writing. For this purpose I trained my system with quite a lot examples of alphabets with few different styles. I have used newff and achieved 95% accuracy in classification. Now if I give a wrong sample as testing data which i meant to be classified as none among i have trained my network on, the system does not work fair. It identifies as the closest match among all the classes. for example I give 'A' without '-'between A(same as V upside down) it should be a mistake and my system should give a response like it belongs none of the three classes on which i have trained it. instead its predicting as Class A which i dont want.
On the other hand if I train the system with 2 classes only, having all of the correct alphabets as 1 class and all of the wrong alphabets as 0 class, the system is giving 0% accuracy on correct one and 100% on wrong one which means its classifying all of the data as class 0.
Can anyone tell me how to solve this problem? What if I use NEWGRNN instead of NEWFF as it looks regression problem more than classification. If it is so than how can i use it efficiently and how to determine the value of spread in GRNN parameter? please help thanks

Best Answer

1. Order classes in block form,i.e. [All A's, All B'as, etc].
2. Train 4 classes without a threshold and test. If satisfied, then thresholds are not necessary.
3. Make multiple single class test runs using nontraining data for 0.25 < thresh < 1. Record the results and choose the best threshold for each class.
y = sim(net,input);
[maxP classy] = max(y)
if classy < 4 & maxP < thresh(class)
classy = 4
end.
Hope this helps.
Greg