How to add custom accuracy function in Matlab's inbuilt shallow neural network patternnet function for each iteration
2 views (last 30 days)
Show older comments
I am using matlab's patternnet function to compare my custom neural net classifier.
After initializing the network as "net = patternnet(2,'trainscg')", we train the classifier using "[trainedNet,tr] = train(net,X,T,Xi,Ai,EW)" function where the 'tr' output function gives me training error, validation error and testing error. How can i add a custom function that calculates accuracy and saves the accuracy in the tr function similar to the error values that are stored for every iteration. Thanks in advance
0 Comments
Answers (1)
Shashank Gupta
on 30 Dec 2020
Hi Chinmay,
I am afraid there is no straight forward way to do what you are intending to do. Although you can find out the accuracy after the training is completed. That should give you a way to compare your model with another network. Even if your sole purpose is to compare different classifier, you can do so using the loss too. The loss matrix provides the same feel.
Cheers.
See Also
Categories
Find more on Modeling and Prediction with NARX and Time-Delay Networks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!