How to change the outputs of the neural network that the error function receives

Technical Source
2 min readJun 3, 2021

--

Given a neural network with 2 output classes there are 2 ways of assigning its real-valued output, M in [0,1], to binary classes.

  1. You have one target class, if M>0.5 assign to class 1. Else, do not (equivalent to assign to class 2).
  2. You have two target classes. If M_{1} > M_{2} assign to class 1, else assign to class 2.

I would like my output to be biased s.t.

  1. if M>0.8 assign to class 1, else class 2.Incidentally, (this is not the main question) would this be equivalent to
  2. If 0.2*M_{1} >0.8*M_{2} assign to class 1, else class 2.

I can change the final outputs in this way. However, I am running the network through some loops and I would like my changes to be recognised within the network’s architecture. It is right that the error function minimises some sort of distance (perhaps least squared) between the output, M, and the target, y? In my case it will be minimising the distance between the old, unmodified output, rather than my threshold adjusted output. Do you know how I can tell the error function about this new output?

Many thanks for any help

ANSWER

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

The classical approach for c classes is to minimize Bayesian Risk R given prior probabilities Pi (i=1:c), classification costs Cij>= 0, Cii = 0 and input conditional probability densities p(i|x).

R = sum(i=1:c)( Pi*Ri ) % Total Risk

Ri = sum(j=1:c){Cij*p(j|x)} % Risk of ith class being misclassified

Hits from searching classification costs with and w/o greg

comp.ai.neural-nets     49         128
MATLAB Newsgroup 15 32
MATLAB Answers 2 6

Applications to the BioID data. Search using BioID

SEE COMPLETE ANSWER CLICK THE LINK

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet