Info

This question is closed. Reopen it to edit or answer.

Is it possible to show the significance of each input in relation to the outputs?

1 view (last 30 days)
For my NN, I use the pattern-classification in Neural Network Toolbox. I have to analyse images in RGB (512x512x3) and find out if it is bleeding. There are manually annotated images already which I have extracted their pixel values. I have converted all the images in HSI image space as well. For the input into the NN, I use 262144 x 6 (R G B H S I) values. For the output, I have annotated the regions with blood in the images and changed their values to 1, with the non-bleeding part 0. The NN toolbox has learnt very well, however I would like to have a database of what pixel values (in RGB or HSI) would the NN consider as a bleeding pixel. Is it possible to do that?
In my opinion there are two ways in doing this: 1) Study the connection weights from the input to output. However this will be very time-consuming and complicated. Furthermore I am not sure if there is a function that allows me to extract the connect weights. I wonder if there is a more efficient way to do this that maps how likely the NN would consider a pixel value as blood or not-blood?
2) Create an image with red pixels ranging from pink to dark red (possible blood colours), then see which would the NN classify as bleeding and extract that pixel. However I don't know how to use the NN trained with Matlab to test a new image. I see there are past articles discussing this but I don't see a clear conclusion. Would the NARNET be suitable? link: http://www.mathworks.com/matlabcentral/newsreader/view_thread/338508#930420
Howard
  3 Comments
Howard Chow
Howard Chow on 7 Apr 2015
Hi Greg, what do you mean by the plans for teaching? My ultimate goal is to implement a simple blood-detecting program with the help of ANN, but I don't want to include the net in the program.
Greg Heath
Greg Heath on 7 Apr 2015
Edited: Greg Heath on 8 Apr 2015
Training a NN means teaching it that the ideal answers to the training input matrix xtrn(I,N) is the training target matrix t(O,N). You then have a function which can be used on nontraining data.

Answers (1)

Greg Heath
Greg Heath on 9 Apr 2015
The following is a general answer to your title which may or may not be directly applied to your particular problem.
1. It is best to standardize the variables to zero-mean/unit-variance (orthogonal inputs would be ideal. However, life is not always so kind).
2. Set an acceptable maximum MSEgoal (I use 0.01 yielding Rsquare = 0.99)
3. Train multiple models and minimize the number of hidden nodes. I favor a double loop approach with number of hidden nodes in the outer loop and different initial state of the random number generator in the inner loop.
4. Rank the inputs when each is, separately, "effectively removed" by replacing it with it's constant mean value of 0.
There are a variety of ways to procede using backward and/or forward search. For either choice, the largest difference occurs depending on whether or not the nets are retrained after each variable is added or removed.
For large problems the retraining is often omitted to save time. How much this skews results depends on the data.
Typically, my preference is to remove the less effective inputs in contrast with trying to "rank" the best inputs.
Hope this helps.
Greg

Community Treasure Hunt

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

Start Hunting!