Question: The binary cross - entropy loss function is defined by l ( p , q ) = - plog ( q ) - ( 1

The binary cross-entropy loss function is defined by
l(p,q)=-plog(q)-(1-p)log(1-q)
for any numbers p and q with 0p1 and log(q)qp=.75l(p,q)qpql(p,q)np.log0. Here log(q)is the
natural logarithm ofq.
(a) What is the binary cross-entropy function used for in machine learn-
ing?
(b) Let p=.75 and use matplotlib.pyplot to plot l(p,q)as a function
ofq, with p held fixed. What value ofq minimizes l(p,q)?
Hint: The function np.logis useful.
 The binary cross-entropy loss function is defined by l(p,q)=-plog(q)-(1-p)log(1-q) for any

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!