May 2020
Intermediate to advanced
404 pages
10h 52m
English
Finally, we perform the training and note the observed accuracy of the method:
for i in range(len(X_train)): xt = X_train[i].reshape(1, -1) yt = y_train.values[[i]] clf = clf.partial_fit(xt, yt, classes=[0,1]) if i > 0 and i % 25 == 0 or i == len(X_train) - 1: score = clf.score(X_test, y_test) print("Iters ", i, ": ", score)
The output of the preceding block of code in Jupyter Notebook is as follows:

We can see that after training on all of the 241 samples in the processed dataset, the accuracy is expected to reach 83.60%. Notice the partial_fit method in the preceding block of code. This is a method of the ...
Read now
Unlock full access