I hope you are doing well, I am contacting you regarding my second exercice in this lab: C3 W1 Lab 2
Can someone tell me the shape of p_val ? I assume it is a one dimensional array with “m” attributes ? just like y_val, but the code keep giving me this error :
I initiated the tp, fp, fn to zero and then i made a loop in range (m) to increment these ( example when p_val[i] < epsilon and y[i] == 1 then tp +=1 )
Please help me why they say it is division by zero here
Hello TMosh, Thank you very much for your answer, For these values, I used a loop that increments each one, for example : when p_val[i] < epsilon and y[i] == 1 then tp +=1, I assumed that p_val is already calculated, is it correct ?
I think your method is not giving the correct results.
I recommend you read all of the Hint code, it gives methods for computing predictions and all of the metrics using one-line of code that avoids using loops.