Issue
I am kind of new to machine learning and I am running sample code from a book about machine learning, the code I am trying to run is here:
from sklearn.linear_model import SGDClassifier
clf = SGDClassifier(loss='log', random_state=1)
but when I call partial_fit() I get the error below:
The 'loss' parameter of SGDClassifier must be a str among {'hinge', 'modified_huber', 'huber', 'squared_error', 'epsilon_insensitive', 'squared_epsilon_insensitive', 'perceptron', 'squared_hinge', 'log_loss'}. Got 'log' instead.
can anyone help me with this.
Thank you.
Looking at the documentation, 'log' is a valid parameter.
Solution
Please use 'log_loss' for the loss parameter, It should solve your problem.
Answered By - Shabnam Salman
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.