Let’s say we have dataset of people's Heights and Weights as inputs and the T-Shirt size which they wear as outputs for example: XL, L, M, S, XS. I am using Matlab nprtool's default configuration for such problems, i.e. One-vs-All classification model with trainscg for traning & mse for performance evaluation.
The problem I am facing is that classification results are not very good. One obvious reason is that there is no way the neural net can explicitly judge that XL is closer to L than XS. In current setup, XL<->XS misclassification is considered same as XL<->L misclassification. Whereas XL<->L misclassification is not as problematic as XL<->XS.
I tried replacing XL, L, M, S and XS as numbers for example, XL=5, L=4, M=3, S=2 & XS=1 and used curve fitting tool which performed exceptionally well. But unfortunately I cannot use this model because I need output in terms of probabilities rather than concrete predictions. For example what I want is that I should be able to give height and weight and get probability for each of the classes (XL, L, M, S & XS).
I believe there should be a way to customize performance function. I would like to map my output classes on to numbers, multiply them with their probabilities and get a final output. For this output I will use mse for performance evaluation the way it is done in the context of curve fitting. My question is how do I do that in Matlab? Please note that I am fairly new to Matlab's nprtool so use layman type language rather than using nprtool's jargon.
Best Answer