From 264b9771bb24560b4054716f94434aa1125f7ab9 Mon Sep 17 00:00:00 2001 From: ben-jaynes <1btjaynes@gmail.com> Date: Thu, 21 May 2026 10:40:34 -0700 Subject: [PATCH] vault backup: 2026-05-21 10:40:34 --- .../Class 4-23 (Model Validation & Evaluation).md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Running Start/CSB320 - Machine Learning Concepts/Class 4-23 (Model Validation & Evaluation).md b/Running Start/CSB320 - Machine Learning Concepts/Class 4-23 (Model Validation & Evaluation).md index 38fc0fa..efad5ec 100644 --- a/Running Start/CSB320 - Machine Learning Concepts/Class 4-23 (Model Validation & Evaluation).md +++ b/Running Start/CSB320 - Machine Learning Concepts/Class 4-23 (Model Validation & Evaluation).md @@ -67,3 +67,14 @@ There are many ways to evaluate the performance of models. This is necessary to Loss functions are meant to quantify the difference between observed values and the predictions of a model. They can be used to minimize loss and improve model performance. ### Absolute Loss $$Y_{i} - \hat{Y}_{i}$$ +Used to measure the difference from the observed value and predicted value by the model. +### Mean Absolute Error +$$MAE=\frac{1}{n}\sum|\hat{Y}_{i} - Y_{i}|$$ +Calculates the average absolute loss of a model based on a training set of data. Is a metric that can be used to improve the accuracy of a model and train it. Should be minimized. + +Mean squared error is also used to penalize predictions that are further from observed values more heavily. +$$MSE = \frac{1}{n}\sum(\hat{Y}_{i} - Y_{i})^2$$ +Since MSE produces a convex curve in the error metric it also allows the use of algorithms like gradient descent optimization to tune the weights of a model. +### Log Loss +$$L_{\log}(y_{i}, \hat{p}_{i}) = -(y_{i}\ln(\hat{p}_{i}) + (1-y_{i})\ln(1-\hat{p}_{i}))$$ +Log loss is used to optimize the weights of a logistic regression. MSE cannot be used since a logistic regression is not linear and the error with respect to weights does not have a clear minimum. This makes it challengin \ No newline at end of file