0

I'm working on optical character recognition problem. I've successfully extracted features which is a [1X32] matrix (I've extracted 32 features from each segmented character). I've the complete training data set (the images of every individual character), but I'm breaking my head on creating Input & Target data set matrices. So please tell me about those matrices, the testing data, & in what format will I get output from neural network.

1)There are 258 different patterns (characters), so, should there be 258 class labels ?

My input matrix size is No. of rows = 32 (features) No. of cols = 258*4=1032 (No of characters*No of instances for each character)

2) what should be the size of my target matrix ? Just draw a dummy target matrix for my case.

1
  • if the answer provided helped please accept it at the left side of it. Commented May 30, 2014 at 9:26

1 Answer 1

1

Did you checked the Neural Network Toolbox of MATLAB already (http://www.mathworks.co.uk/help/nnet/examples/crab-classification.html?prodcode=NN&language=en) ? There you can find some examples how to work with neural networks.

Regarding your two specific questions:

1) Typically if you want to differentiate between N different characters you will need that amount of class labels. So in your case yes you should have 258 class labels. The output of a classification problem using neural networks is typically a binary output where one goes for the identified class and 0 for the remain classes. It can happen however, if you use a sigmoid function as the last activation function that neither output node is exactly 0 or 1, and in this case you can for example take the maximum of all output nodes, to get the highest or more probable class for a certain input.

2) The target matrix should be a binary matrix where 1 goes for the correct class and 0 for all the others classes for each input. So in your case it should be 258*1032 matrix. Again I recommend you to check the link given above.

Good luck.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank You.... It solved my problem, but the efficiency of my neural network is very low, its predicting the wrong output. Where do you think should i concentrate to improve the efficiency ?
It seems you have too few samples (4 for each class) and maybe too many features. Try the network with different combination of features, or any other type of feature selection. If possible provide more samples for training
Thank You, I'll try with your suggestions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.