AIExplainer

What is a linear model?

A model that assigns one weight per feature to make predictions.

A model that assigns one weight per feature to make predictions. (Linear models also incorporate a bias.) In contrast, the relationship of features to predictions in deep models is generally nonlinear. Linear models are usually easier to train and more interpretable than deep models. However, deep models can learn complex relationships between features. Linear regression and logistic regression are two types of linear models.

where: - y' is the raw prediction. (In certain kinds of linear models, this raw prediction will be further modified. For example, see logistic regression.) - b is the bias. - w is a weight, so w1 is the weight of the first feature, w2 is the weight of the second feature, and so on. - x is a feature, so x1 is the value of the first feature, x2 is the value of the second feature, and so on. For example, suppose a linear model for three features learns the following bias and weights: - b = 7 - w1 = -2.5 - w2 = -1.2 - w3 = 1.4 Therefore, given three features (x1, x2, and x3), the linear model uses the following equation to generate each prediction:

Suppose a particular example contains the following values: - x1 = 4 - x2 = -10 - x3 = 5 Plugging those values into the formula yields a prediction for this example:

Linear models include not only models that use only a linear equation to make predictions but also a broader set of models that use a linear equation as just one component of the formula that makes predictions. For example, logistic regression post-processes the raw prediction (y') to produce a final prediction value between 0 and 1, exclusively. ---