July 2019
Beginner to intermediate
740 pages
16h 52m
English
Let's build our online learning model in the 5-online_learning.ipynb notebook. First, we will use the get_X_y() function to get our X and y training data using the full year of 2018:
>>> X_2018, y_2018 = get_X_y(logs_2018, '2018', hackers_2018)
Since we will be updating this model in batches, our test set will always be the data we are using for our current predictions. After we do so, it will become the training set and be used to update the model. Let's build our initial model trained on the 2018 labeled data:
>>> from sklearn.linear_model import SGDClassifier>>> from sklearn.preprocessing import StandardScaler>>> from ml_utils.partial_fit_pipeline import PartialFitPipeline>>> model = PartialFitPipeline([... ('scale', ...Read now
Unlock full access