Linear Regression Loss function for Logistic regression
You have taken x,y from random space. So, it should not follow any rule/logic.
Get a real data e.g. Iris(just 2 class) or using sklearn make_classification module
 Figure out the approx value of theta for a good model
 Then loop before and after this value
 Have y_true in probability(not the Class)