Borrar filtros
Borrar filtros

How to add custom accuracy function in Matlab's inbuilt shallow neural network patternnet function for each iteration

1 visualización (últimos 30 días)
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

Respuestas (1)

Shashank Gupta
Shashank Gupta el 30 de Dic. de 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.
  1 comentario
Chinmay Rane
Chinmay Rane el 8 de En. de 2021
Thank you for your reply. I wanted to check the accuracy for each iteration for LM algorithm. I understand that i can use the final accuracy to compare the model but i wanted to see if i can add a custom metric just as similar to custom loss metric i can add in the matlab network code. Anyways thanks i coded LM from scratch to compare. Thanks for your reply
Chinmay

Iniciar sesión para comentar.

Categorías

Más información sobre GPU Computing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by