Machine learning (ML) is the study of computer algorithms that can improve automatically through experience and by the use of data ... Machine learning algorithms build a model based on sample data, known as "training data", in order to make predictions or decisions without being explicitly programmed to do so.
Supervised learning uses labeled data and is akin to regression methods in statistics in that one (or more) variables are treated as dependent.
Unsupervised learning includes clustering, visualization, and distance-based methods. Seeks to understand structure rather than use some variables to predict others.
A subset of machine learning is closely related to computational statistics, which focuses on making predictions using computers; but not all machine learning is statistical learning.
All or most of what we cover in this class can be thought of as statistical learning.
If you want to know more, I highly recommend reading and referring to The Elements of Statistical Learning.
As a practical matter, I like to make the following distinction:
If you evaluate your model using hold out data you're doing ML.
sklearn
version 1.0.1.sklearn
.linear_model
and ensemble
APIs.from sklearn.linear_model import LogisticRegression
Logistic regression with a ridge penalty has the following objective function (with $g$ the logistic function):
$$ \mathscr{L}(b) = \sum_{i=1^n} -y_i \log g(x_ib) - (1 - y_i)\log(1 - g(x_ib)) + \lambda \sum_{k=1}^p b_k^2. $$
$\lambda$ is a hyper-parameter that controls the amount of regularization.
Logistic regression with a Lasso penalty has the following objective function:
$$ \mathscr{L}(b) = \sum_{i=1^n} -y_i \log g(x_ib) - (1 - y_i)\log(1 - g(x_ib)) + \lambda \sum_{k=1}^p |b_k|. $$
The elastic-net interpolates between the $L_1$ and $L_2$ penalties.
$$ \mathscr{L}(b) = \sum_{i=1^n} -y_i \log g(x_ib) - (1 - y_i)\log(1 - g(x_ib)) + \alpha \lambda \sum_{k=1}^p |b_k| + (1 - \alpha)\frac{\lambda}{2}\sum_{k=1}^p b_k^2. $$