0% found this document useful (0 votes)
16 views3 pages

Cheat Sheet Test Lab

The document provides a cheat sheet for calculating entropy and various error metrics in data analysis. It includes formulas for Gain Ratio, R-squared, Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Signed Difference, and Mean Absolute Percentage Error (MAPE). Each metric is accompanied by notes explaining its significance and application.

Uploaded by

aa aa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views3 pages

Cheat Sheet Test Lab

The document provides a cheat sheet for calculating entropy and various error metrics in data analysis. It includes formulas for Gain Ratio, R-squared, Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Signed Difference, and Mean Absolute Percentage Error (MAPE). Each metric is accompanied by notes explaining its significance and application.

Uploaded by

aa aa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Cheat Sheet Test Lab

Possible Split Criterion: Gain Ratio


𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑝 = − σ𝑛𝑖=0 𝑝𝑖 log 2 𝑝𝑖 for 𝑝 ∈ ℚ𝑛
Based on entropy = measure for information / uncertainty

𝑝1 = 7Τ13 𝑝1 = 13Τ13 = 1

𝑝2 = 6Τ13 𝑝2 = 0Τ13 = 0

𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑝 = − 7Τ13 log 2 7Τ13 + 6Τ13 log 2 6Τ13


𝐸𝑛𝑡𝑟𝑜𝑝𝑦 𝑝 = − 13Τ13 log 2 13Τ
13 + 0Τ13 log 2 0Τ13
= 0,995 =0

2
Numeric Errors: Formulas
Error Metric Formula Notes

R-squared σ𝑛𝑖=1(𝑦𝑖 −𝑓(𝑥𝑖 ))2 Universal range: the closer to 1 the


1− better
σ𝑛𝑖=1(𝑦𝑖 −𝑦)2
𝑛
Mean absolute error (MAE) 1 Equal weights to all distances
෍ |𝑦𝑖 − 𝑓(𝑥𝑖 )| Same unit as the target column
𝑛
𝑖=1
𝑛
Mean squared error (MSE) 1 Common loss function
෍(𝑦𝑖 − 𝑓(𝑥𝑖 ))2
𝑛
𝑖=1

Root mean squared error (RMSE) 𝑛


Weights big differences more
1 Same unit as the target column
෍(𝑦𝑖 − 𝑓(𝑥𝑖 ))2
𝑛
𝑖=1

𝑛
Mean signed difference 1 Only informative about the direction of
෍ 𝑦𝑖 − 𝑓 𝑥𝑖 the error
𝑛
𝑖=1
𝑛
Mean absolute percentage error (MAPE) 1 |𝑦𝑖 − 𝑓(𝑥𝑖 )| Requires non-zero target column
෍ values
𝑛 |𝑦𝑖 |
𝑖=1 3

You might also like