Scikit-learn (also referred to as
sklearn) is another extremely popular package used by data scientists. The main purpose of
sklearn is to provide APIs for processing data and training machine learning algorithms. But before moving ahead, we need to know what a model is.
What Is a Model?
A machine learning model learns patterns from data and creates a mathematical function to generate predictions. A supervised learning algorithm will try to find the relationship between a response variable and the given features.
Have a look at the following example.
A mathematical function can be represented as a function, ƒ(), that is applied to some input variables, X (which is composed of multiple features), and will calculate an output (or prediction), ŷ:
The function, ƒ(), can be quite complex and have different numbers of parameters. If we take a linear regression (this will be presented in more detail...