In the perceptron implementation for a linearly separable dataset my loss is 0

In the first epoch itself my loss is coming out to be zero

Hey @shreyanarula3, can you please share your code ?

Hey @shreyanarula3, I checked your code. There is no error in your code. Just try changing the random state to some other value other than 10 and you would see different loss returned by your function.

Also in this case loss = 0 is also fine. This means that your model is able to make the predictions pretty well. As the spread of data becomes more complex you would see the loss increasing yourself :slight_smile:

Hope this helps.
All the very best !