Classification:getting error

Hi Soumyadeep

sgd_clf.fit(X_train, y_train_5) should be the code in code line [54]
you have written sgd_clf.fit(X_train, y_train5)

Please rectify the second argument.

Regards

no i have taken that argument initially

you can see the code

Hi Soumyadeep,

I think you should check the entire code once again. There might be some kind of inconsistency prior in the notebook as it giving a ValueError and says that the number of classes should be more than 1 but its getting just 1 class. Try to kill the kernel and rerun the code cells one by one.

It happens sometimes that even with the right code, some error pops up. Please check and let me know the result.

Regards

I have run all cells but getting the same error

Hi Soumyadeep,

In line [36] try changing your code to
y_train=(y_train==“5”)
y_test=(y_test==“5”)

See if it works

Regards

yes it works thank you

Hi Soumyadeep,

Great!!

Happy Coding and Regards