how to define unknown class in neural network?

2 次查看(过去 30 天)
sir,i am doing project on "Palmprint and Fingerprint recognition using neural network". I have trained the network and i am getting 100% accuracy for trained images. I have define two classes 1st is 'access granted' and 2nd is 'access denied'.But for untrained images it gives 'access granted' but instead of that it should give me 'access denied'.So, how can i define the class for unknown images(untrained images).I have attached my code also please check and give me the solution.

采纳的回答

Greg Heath
Greg Heath 2014-4-16
Insufficient information
How many images in each class?
How many features in each image?
What type of neural net?
How many inputs? How many parameters to estimate?
How many images in the training, validation and testing subsets?
Use a single output with {0,1} targets.
I recommend equalizing the number of images in each class by creating noisy copies of the smaller class. You could parameterize your final results depending on the SNR of the created copies.
Design multiple copies with the training subset. Choose the best with the validation subset. Estimate performance on unknown data with the test subset.
Overlay the plots of the cumulative distribution of the 1 class and 1-cumdist of the zero class outputs. You should get an S-shaped curve for one and a reverse S-shaped curve for the other. For an output of y, assign the input to the class corresponding to the higher curve. Since they are monotonic and intersect at some value, T, the equal error decision rule is to assign the input to class 1 if y>=T (threshold). Otherwise assign it to class 0.
If you have inputs which you have not trained on, you could use a double threshold (T0 < T1)with the decision rule assign to class 0 if y<=T0, assign to class 1 if T1 <= y otherwise assign to the unknown class. Better values of T0 and T1 can be estimated the better you can guess the distribution of unknowns.
Sometimes T0 and T1 are determined to yield specified correct classification rates for classes 0 and 1. Then the number of false classifications will be uncontrolled.
There are more involved schemes involving a priori probabilities and classification costs. Details are found in pattern recognition texts. I gave mine to MIT when I retired in 2003 and have no idea which are currently recommended.
Hope this helps;
Thank you for formally accepting my answer
Greg

更多回答(1 个)

Walter Roberson
Walter Roberson 2014-4-15
The simplest rule that a neural network can generate when given a bunch of examples and told that they all succeed, is to guess that everything succeeds.

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by