September 2018
Intermediate to advanced
472 pages
12h 2m
English
We will complete this part of the chapter devoted to learning from big data with a quick overview of the SGD family, comprising SGDClassifier (for classification) and SGDRegressor (for regression).
Like other classifiers, they can be fit by using the .fit() method (passing row by row the in-memory dataset to the learning algorithm) or the previously seen .partial_fit() method based on batches. In the latter case, if you are classifying, you have to declare the predicted classes with the class parameter. It can accept a list containing all the class code that it should expect to meet during the training phase.
SGDClassifier can behave as a logistic regression when the loss parameter is set to ...
Read now
Unlock full access