We'll be diving into the basic principles of machine learning and demonstrate the use of these principles via the scikit-learn basic API.
The scikit-learn library has an estimator interface. We illustrate it by using a linear regression model. For example, consider the following:
In [3]: from sklearn.linear_model import LinearRegression
The estimator interface is instantiated to create a model, which is a linear regression model in this case:
In [4]: model = LinearRegression(normalize=True) In [6]: print model LinearRegression(copy_X=True, fit_intercept=True, normalize=True)
Here, we specify normalize=True, indicating that the x-values will be normalized before regression. Hyperparameters (estimator parameters) are passed on as arguments in the model creation. This is an example of creating a model with...