Introduction to Machine Learning Evaluation: Measures for Regression - - PowerPoint PPT Presentation

introduction to machine learning evaluation measures for
SMART_READER_LITE
LIVE PREVIEW

Introduction to Machine Learning Evaluation: Measures for Regression - - PowerPoint PPT Presentation

Introduction to Machine Learning Evaluation: Measures for Regression Learning goals Know the definitions of mean squared error (MSE) and mean absolute error (MAE) Understand the connections of MSE and MAE to L2 and L1 loss Know the


slide-1
SLIDE 1

Introduction to Machine Learning Evaluation: Measures for Regression

Learning goals

Know the definitions of mean squared error (MSE) and mean absolute error (MAE) Understand the connections of MSE and MAE to L2 and L1 loss Know the definitions of R2 and generalized R2

slide-2
SLIDE 2

MEAN SQUARED ERROR

MSE = 1

n n

  • i=1

(y(i) − ˆ

y(i))2 ∈ [0; ∞)

→ L2 loss.

Single observations with a large prediction error heavily influence the MSE, as they enter quadratically.

6.65 1.15

1 2 3 4 5 6 7 2 4

x y 6.65 1.15

5 10 15 −4 −2 2 4

Residuals = y − y ^ L(y ^, y)

Similar measures: sum of squared errors (SSE), root mean squared error (RMSE, brings measurement back to the original scale of the

  • utcome).

c

  • Introduction to Machine Learning – 1 / 4
slide-3
SLIDE 3

MEAN ABSOLUTE ERROR

MAE = 1

n n

  • i=1

|y(i) − ˆ

y(i)| ∈ [0; ∞)

→ L1 loss.

Less influenced by large errors and maybe more intuitive than the MSE.

2.58 1.07

1 2 3 4 5 6 7 1 2 3 4 5

x y 2.58 1.07 6.65 1.15

5 10 15 −4 −2 2 4

Residuals = y − y ^ L(y ^, y)

Similar measures: median absolute error (for even more robustness).

c

  • Introduction to Machine Learning – 2 / 4
slide-4
SLIDE 4

R2

Well-known measure from statistics. R2 = 1 −

n

  • i=1

(y(i) − ˆ

y(i))2

n

  • i=1

(y(i) − ¯

y)2

= 1 − SSELinMod

SSEIntercept Usually introduced as fraction of variance explained by the model Simpler: compares SSE of constant model (baseline) with complex model (LM) R2 = 1: all residuals are 0, we predict perfectly, R2 = 0: we predict as badly as the constant model If measured on the training data, R2 ∈ [0; 1] (LM must be at least as good as the constant) On other data R2 can even be negative as there is no guarantee that the LM generalizes better than a constant (overfitting)

c

  • Introduction to Machine Learning – 3 / 4
slide-5
SLIDE 5

GENERALIZED R2 FOR ML

A simple generalization of R2 for ML seems to be: 1 − LossComplexModel LossSimplerModel Works for arbitrary measures (not only SSE), for arbitrary models,

  • n any data set of interest

E.g. model vs constant, LM vs non-linear model, tree vs forest, model without some features vs model with them included Fairly unknown; our terminology (generalized R2) is non-standard

c

  • Introduction to Machine Learning – 4 / 4