One of the reasons scikit-learn is so popular is its ease of use. There are only a few, well thought-out API designs in the library and they are applied in a sweeping manner across many different methods and routines. This chapter will make use of the Estimator API. It's extremely straightforward, and, once you understand how to use it, you can try our new regression and classification estimator methods with ease, because they all work in the same way (in other words, they all make use of the Estimator API).
The steps are given as follows:
- Import the module
- Instantiate the estimator object (regression or classification model in the following diagram)
- Fit the model-to-map input training data (X_train in the following diagram) to the ground truth y_train labels
- Predict y_pred on the new test data (X_test in the following diagram)
It can also be...