In scikit-learn, ML models are implemented in classes known as estimators, which include any object that learns from data, mainly models or transformers. All estimators have a fit method, which is used with a dataset to train the estimator like this: estimator.fit(data).
It is important to note that the estimator has two kinds of parameters:
- Estimator parameters: All the parameters of an estimator can be set when it is instantiated or by modifying the corresponding attribute. Some of these estimator parameters correspond to the ML model hyperparameters. We will talk about model hyperparameters more later.
- Estimated parameters: When data is fitted with an estimator, parameters are estimated from the data at hand. All the estimated parameters are attributes of the estimator object, ending with an underscore.
Since scikit-learn has a very consistent API using estimators, it...