Neural Network Script to have Specific Testing Data from Inputs.
Ältere Kommentare anzeigen
Hello everyone,
I have been trying to write a neural network script that uses DivideInd to train my neural network. I'm using all the data for my input as the training and validating data for the neural network, however for the testing data I am using only the initial third of the data. However when I run the script, I run into the issue of,
??? Undefined function or method 'patternnet' for input arguments of type 'double'.
My code is as shown below, and yes I have made sure to be in the working directory when I run the script so that is not the issue.
inputs = Hand_Data_Inputs;
targets = Hand_Data_Targets;
% Create a Pattern Recognition Network
hiddenLayerSize = 31;
net = patternnet(hiddenLayerSize);
% Set up Division of Data for Training, Validation, Testing
net.divideFcn = 'divideInd';
net.divideParam.trainInd = 1:3000;
net.divideParam.valInd = 1:3000;
net.divideParam.testInd = 1:1000;
% Train the Network
[net,tr] = train(net,inputs,targets);
% Test the Network
outputs = net(inputs);
errors = gsubtract(targets,outputs);
performance = perform(net,targets,outputs);
Any help would be greatly appreciated, thank you
4 Kommentare
Image Analyst
am 12 Okt. 2014
Star Strider
am 12 Okt. 2014
In the Command Window, type:
which patternnet -all
It should return a string with the full directory path and the file name.
Richard
am 12 Okt. 2014
Star Strider
am 12 Okt. 2014
If you have the Neural Network Toolbox installed (I assume you do), see if my Answer solves the problem.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Pattern Recognition finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!