July 2017
Intermediate to advanced
382 pages
9h 13m
English
We can, for instance, build an ensemble from a collection of 10 k-NN classifiers as follows:
In [1]: from sklearn.ensemble import BaggingClassifier... from sklearn.neighbors import KNeighborsClassifier... bag_knn = BaggingClassifier(KNeighborsClassifier(),... n_estimators=10)
The BaggingClassifier class provides a number of options to customize the ensemble:
Read now
Unlock full access