How can I implement my own custom performance function

1 view (last 30 days)
Hi All,
I am using nn toolbox functions to create a neural network for classification purpose (2 output neuron). Instead of using standard performance function to be optimized, I want to use my own. Such that my performance function will be:
( fp/(fp+tn) ) + ( fn/(fn+tp) );
where
  • tp: true positive
  • fn: false negative
  • and so on
of course output y of the network must be converted to 0 or 1. maybe like this:
yPred = ( y(:,1) > y(:,2) );
how can I do this with using newpr or newff?
any help appreciated Thanks

Answers (0)

Community Treasure Hunt

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

Start Hunting!