Regarding Visualizing Loss Function in SVM Classifier

well its look my model is overfitting the data as it gives 100% accuracy in training data and 26 %accuracy on test data and i was visualizing the loss function fo this but my loss function reduce to 0 so does that means i have learnt the best parameters possible for my mode plzz explain me this and in graph my loss function was finally decreased to 0 but in midway it does have fluctuations

Here is a link of my code and graphs.Take a look

Is it becuase my data cannot be classified by linear hyperplane??

Hi @amankharb,

The loss plot you are visualizing is of the training data which is not sufficient to comment whether you have found the ideal weights or not. Try visualizing the loss plot for the test data as well.
Regardless, the model is definitely over-fitting (100% Train and 26% Test accuracy). To stop this, a quick fix is to use early-stopping (Reduce the number of epochs). Also try playing around with the c parameter.

Hope this helps!