Run/Display Neural Network on Test data after training
Show older comments
Hi all, I have a pipeline where I test/train some data on a neural network, the code was generated using the neural network toolbox so it should be fairly standard for those of you who have used this before.
The problem is I want to run my neural network on some fresh test data now that it is has been trained.
results = net(X');
view(results);
Error using view>ViewCore (line 171)
Argument must be scalar, or two-vector
Error in view (line 69)
ViewCore(hAxes, viewArgs{:});
Error in mainNeural2 (line 95)
view(results)
Error in mainNeural (line 139)
mainNeural2
I'm wondering if you have any advice on how I can actually display my neural network, I've looked at "results" and the values returned seem to be the same dimensions and roughly in keeping with the initial training/test run.
Just so you know the 'net' used in the code above is returned from a separate function beforehand so it is in the workspace.
The data in results looks like this:
0.500013823172753 0.500001510152403 ........
0.579181096664039 0.654171440064530 .......
0.521562315394349 0.502021472887101
0.538257766843839 0.521015241194003
0.513800680860541 0.503471901344177
0.847184317064479 0.819318434357785
As you can see this is meaningless to me without a graphical representation. Thanks in advance for your help, I'm really stuck and it's much appreciated.
Edit: I can only thing this has something to do with the settings set during the test/training run. For example
% Choose Input and Output Pre/Post-Processing Functions
% For a list of all processing functions type: help nnprocess
net.input.processFcns = {'removeconstantrows','mapminmax'};
net.output.processFcns = {'removeconstantrows','mapminmax'};
My ideal end would be to display a confusion matrix, in the short term I just want to see what class it classifies the values as so I can see by eye on a small dataset if it is working. Cheers!
Accepted Answer
More Answers (2)
Scott
on 9 May 2014
After you have built and trained your network, use the "sim" command to simulate the network, e.g.
Y = sim(net,P) % P is some input data
Montgomery
on 9 May 2014
0 votes
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!