Getting inf as an output of likelihood logistic regression

sir ,as shown in image i’m getting the following output and not able to resolve that can you help me out with that.
thank you.

hey @harshitt.ip.17 ,
work on with lower learning rate like 0.01 or 0.0001 .
you are taking a very large learning rate value.
If still it persist , then kindly upload your code on github and share with me its link so that i can’t see if you have implemented the algorithm correctly or not.

Thank You :slightly_smiling_face:.

hey @harshitt.ip.17,
you are working with sigmoid function , which means your output values will be in range -1 to 1.
I hope you know this.

and now if you check your Y_train values , might find some values out of this range . That is the only reason, that your model isn’t able to work properly. Hence , providing you with poor results.
So what you need to do is , add another column with values either 0 or 1 only.( 500 0’s and 500 1’s )
This will be your target values and after this train you model. I hope it will work.

yes sir ,the model is now working as expected

i am grateful to you for your help , thank you so much sir. :slight_smile:

No Problem @harshitt.ip.17.
:slightly_smiling_face: