Question: Part Three: Implement log_loss [Graded] Now you will compute the negative log likelihood in log_loss. You are given the label vector y and the data
Part Three: Implement log_loss [Graded] Now you will compute the negative log likelihood in log_loss. You are given the label vector y and the data matrix X with n data points as row vectors. The negative log likelihood ( ) is defined as follows: =log(|;,)=log=1(|;,)==1log(|;,)==1log((+)). While we only computed the probability of a positive label in y_pred, now we will account for the actual value. You can use your implementation of y_pred for log_loss or reimplement to account for the -- the latter yields cleaner code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
