{"id":75,"date":"2023-10-02T12:12:00","date_gmt":"2023-10-02T12:12:00","guid":{"rendered":"https:\/\/amirhooshang.com\/blog\/?p=75"},"modified":"2025-05-16T20:44:01","modified_gmt":"2025-05-16T20:44:01","slug":"regression-evaluation-metrics-in-machine-learning-how-to-choose-and-smartly-combine-them","status":"publish","type":"post","link":"https:\/\/amirhooshang.com\/blog\/2023\/10\/02\/regression-evaluation-metrics-in-machine-learning-how-to-choose-and-smartly-combine-them\/","title":{"rendered":"Regression Evaluation Metrics in Machine Learning: How to Choose and Smartly Combine Them"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><\/h3>\n\n\n\n<p> Regression in machine learning is used to predict continuous values like house prices, tomorrow\u2019s temperature, or someone\u2019s income. But once you\u2019ve built your model, how do you know how accurate it is? For example, if your model predicts a house price that\u2019s 100 million lower than the actual price, how significant is this error? This is where <strong>evaluation metrics<\/strong> come into play! These metrics act like a thermometer, showing where your model shines and where it falls short.<\/p>\n\n\n\n<p>In this article, we\u2019ll break down the main regression metrics in simple, relatable terms. We\u2019ll cover simplified formulas, real-world examples, and when to use (or avoid) each metric. You\u2019ll also learn how to combine metrics for a clearer picture of your model\u2019s performance.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Regression Metrics: Which One Should You Use?<\/strong><\/h3>\n\n\n\n<p>Each metric measures a specific aspect of your model\u2019s error. The right choice depends on your data type and project goals. For instance, if your dataset has extreme values (outliers), you\u2019ll need a specific metric. Let\u2019s dive in:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1. Mean Squared Error (MSE) \u2013 Heavy Penalty for Large Errors<\/strong><\/h4>\n\n\n\n<p><strong>What is it?<\/strong><br>MSE calculates the average of the squared errors. Large errors are punished more harshly. For example, a prediction error of 50 million would be squared to 2500 billion (!) in MSE.<\/p>\n\n\n\n<p><strong>Simplified Formula:<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 43px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-f9f93a0159217adf6b84a2719318053a_l3.png\" height=\"43\" width=\"392\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#83;&#69;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#40;&#69;&#114;&#114;&#111;&#114;&#95;&#49;&#41;&#94;&#50;&#32;&#43;&#32;&#40;&#69;&#114;&#114;&#111;&#114;&#95;&#50;&#41;&#94;&#50;&#32;&#43;&#32;&#8230;&#32;&#43;&#32;&#40;&#69;&#114;&#114;&#111;&#114;&#95;&#110;&#41;&#94;&#50;&#125;&#123;&#78;&#117;&#109;&#98;&#101;&#114;&#92;&#32;&#111;&#102;&#92;&#32;&#83;&#97;&#109;&#112;&#108;&#101;&#115;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Model Prediction: 190 million \u2192 Actual Price: 200 million \u2192 Error: 10 million<\/li>\n\n\n\n<li>Model Prediction: 250 million \u2192 Actual Price: 300 million \u2192 Error: 50 million<\/li>\n\n\n\n<li>Model Prediction: 140 million \u2192 Actual Price: 150 million \u2192 Error: 10 million<\/li>\n<\/ul>\n\n\n\n<p><p class=\"ql-center-displayed-equation\" style=\"line-height: 39px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-976c2144ce6e654b5a517cfe8335f9e6_l3.png\" height=\"39\" width=\"402\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#83;&#69;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#94;&#50;&#32;&#43;&#32;&#53;&#48;&#94;&#50;&#32;&#43;&#32;&#49;&#48;&#94;&#50;&#125;&#123;&#51;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#48;&#32;&#43;&#32;&#50;&#53;&#48;&#48;&#32;&#43;&#32;&#49;&#48;&#48;&#125;&#123;&#51;&#125;&#32;&#61;&#32;&#57;&#48;&#48;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Pros &amp; Cons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros:<\/strong> Prioritizes large errors \u2192 Ideal for critical predictions (e.g., life-saving drug prices).<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Sensitive to outliers \u2192 Misleading if your data has extreme values.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Unit is squared (e.g., &#8220;Toman\u00b2&#8221;) \u2192 Hard to interpret.<\/li>\n<\/ul>\n\n\n\n<p><strong>Comparison with MAE:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use MAE if your data has many outliers, as it treats all errors equally.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2. Mean Absolute Error (MAE) \u2013 Fairly Measures All Errors<\/strong><\/h4>\n\n\n\n<p><strong>What is it?<\/strong><br>MAE calculates the average of absolute errors without squaring them. It treats small and large errors equally.<\/p>\n\n\n\n<p><strong>Simplified Formula:<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 42px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-be750a1df4cc9c657e06327c2bea2b01_l3.png\" height=\"42\" width=\"358\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#65;&#69;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#124;&#69;&#114;&#114;&#111;&#114;&#95;&#49;&#124;&#32;&#43;&#32;&#124;&#69;&#114;&#114;&#111;&#114;&#95;&#50;&#124;&#32;&#43;&#32;&#8230;&#32;&#43;&#32;&#124;&#69;&#114;&#114;&#111;&#114;&#95;&#110;&#124;&#125;&#123;&#78;&#117;&#109;&#98;&#101;&#114;&#92;&#32;&#111;&#102;&#92;&#32;&#83;&#97;&#109;&#112;&#108;&#101;&#115;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Example (Same Data as Above):<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 37px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-8184aa9cd0728524c528054c4b6b6df5_l3.png\" height=\"37\" width=\"212\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#65;&#69;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#32;&#43;&#32;&#53;&#48;&#32;&#43;&#32;&#49;&#48;&#125;&#123;&#51;&#125;&#32;&#8776;&#32;&#50;&#51;&#46;&#51;&#51;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Pros &amp; Cons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros:<\/strong> Robust to outliers \u2192 Great for noisy data.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Can\u2019t distinguish between small and large errors \u2192 A 50M error is treated the same as a 10M error.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Less popular in optimization (e.g., Gradient Descent) due to non-differentiable nature.<\/li>\n<\/ul>\n\n\n\n<p><strong>Comparison with MSE:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use MSE if large errors are critical (e.g., disaster prediction).<\/li>\n\n\n\n<li>Use MAE for datasets with outliers or to avoid exaggerating errors.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3. Root Mean Squared Error (RMSE) \u2013 MSE in Understandable Units<\/strong><\/h4>\n\n\n\n<p><strong>What is it?<\/strong><br>RMSE is the square root of MSE. It aligns the error unit with the original data for easier interpretation.<\/p>\n\n\n\n<p><strong>Simplified Formula:<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 18px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-353181378906f00e865e5459ed0ea408_l3.png\" height=\"18\" width=\"143\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#82;&#77;&#83;&#69;&#32;&#61;&#32;&#92;&#115;&#113;&#114;&#116;&#123;&#77;&#83;&#69;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Example (Using MSE Above):<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 18px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-5b582e5a8f726d0c2b0b9740b777a635_l3.png\" height=\"18\" width=\"166\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#82;&#77;&#83;&#69;&#32;&#61;&#32;&#92;&#115;&#113;&#114;&#116;&#123;&#57;&#48;&#48;&#125;&#32;&#61;&#32;&#51;&#48;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p>This means the average prediction error is 30 million.<\/p>\n\n\n\n<p><strong>Pros &amp; Cons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros:<\/strong> Easy to explain \u2192 Non-technical stakeholders get it.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Still sensitive to outliers.<\/li>\n<\/ul>\n\n\n\n<p><strong>Use Case:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Business reports where clarity matters.<\/li>\n\n\n\n<li>Problems with normally distributed errors.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4. R-Squared (R\u00b2) \u2013 How Much Better Is Your Model Than a Simple Baseline?<\/strong><\/h4>\n\n\n\n<p><strong>What is it?<\/strong><br>R\u00b2 measures how well your model performs compared to a simple baseline (e.g., predicting the mean). Its value ranges from 0 (worst) to 1 (best).<\/p>\n\n\n\n<p><strong>Simplified Formula:<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 43px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-260dffe573ab6a2fa0dafa3fc7f09335_l3.png\" height=\"43\" width=\"422\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#82;&#94;&#50;&#32;&#61;&#32;&#49;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#83;&#117;&#109;&#92;&#32;&#111;&#102;&#92;&#32;&#83;&#113;&#117;&#97;&#114;&#101;&#100;&#92;&#32;&#69;&#114;&#114;&#111;&#114;&#115;&#92;&#32;&#40;&#89;&#111;&#117;&#114;&#92;&#32;&#77;&#111;&#100;&#101;&#108;&#41;&#125;&#123;&#83;&#117;&#109;&#92;&#32;&#111;&#102;&#92;&#32;&#83;&#113;&#117;&#97;&#114;&#101;&#100;&#92;&#32;&#69;&#114;&#114;&#111;&#114;&#115;&#92;&#32;&#40;&#66;&#97;&#115;&#101;&#108;&#105;&#110;&#101;&#92;&#32;&#77;&#111;&#100;&#101;&#108;&#41;&#125;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Baseline model error: 2500<\/li>\n\n\n\n<li>Your model error: 500<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 37px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-08200bf673f2ab1d72b238a27090a74e_l3.png\" height=\"37\" width=\"162\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#82;&#94;&#50;&#32;&#61;&#32;&#49;&#32;&#45;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#53;&#48;&#48;&#125;&#123;&#50;&#53;&#48;&#48;&#125;&#32;&#61;&#32;&#48;&#46;&#56;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><br>This means your model explains 80% of the data variance.<\/li>\n<\/ul>\n\n\n\n<p><strong>Pros &amp; Cons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros:<\/strong> Easy to compare models.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> High R\u00b2 can be misleading if the model performs poorly on new data.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Doesn\u2019t indicate bias.<\/li>\n<\/ul>\n\n\n\n<p><strong>Use Case:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Initial model evaluation to gauge overall performance.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5. Mean Absolute Percentage Error (MAPE) \u2013 Error in Percentage Terms<\/strong><\/h4>\n\n\n\n<p><strong>What is it?<\/strong><br>MAPE expresses error as a percentage, useful for data with varying scales.<\/p>\n\n\n\n<p><strong>Simplified Formula:<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 44px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-7322b393705278c57ed587cb8076ecea_l3.png\" height=\"44\" width=\"300\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#65;&#80;&#69;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#48;&#48;&#92;&#37;&#125;&#123;&#110;&#125;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#92;&#115;&#117;&#109;&#32;&#92;&#108;&#101;&#102;&#116;&#124;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#69;&#114;&#114;&#111;&#114;&#125;&#123;&#65;&#99;&#116;&#117;&#97;&#108;&#92;&#32;&#86;&#97;&#108;&#117;&#101;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#124;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Actual Value: 200 million \u2192 Prediction: 180 million \u2192 Error: 20 million<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 44px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-429766ff170b3a23266956268f0c62bb_l3.png\" height=\"44\" width=\"245\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#65;&#80;&#69;&#32;&#61;&#32;&#92;&#108;&#101;&#102;&#116;&#124;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#50;&#48;&#125;&#123;&#50;&#48;&#48;&#125;&#32;&#92;&#114;&#105;&#103;&#104;&#116;&#124;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#48;&#48;&#92;&#37;&#32;&#61;&#32;&#49;&#48;&#92;&#37;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/li>\n<\/ul>\n\n\n\n<p><strong>Pros &amp; Cons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros:<\/strong> Scale-independent \u2192 Compare errors across datasets.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Fails if actual values are zero (division by zero).<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Unreliable for values close to zero.<\/li>\n<\/ul>\n\n\n\n<p><strong>Use Case:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sales forecasting for products with varying prices (e.g., $10 to $10,000).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6. Mean Squared Logarithmic Error (MSLE) \u2013 For Wide-Ranging Data<\/strong><\/h4>\n\n\n\n<p><strong>What is it?<\/strong><br>MSLE uses logarithms to reduce the impact of large value differences. Ideal for data with exponential growth (e.g., population or sales over decades).<\/p>\n\n\n\n<p><strong>Simplified Formula:<\/strong><br><p class=\"ql-center-displayed-equation\" style=\"line-height: 36px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-b99af678f3723176e22f8ba03ed1a20b_l3.png\" height=\"36\" width=\"439\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#83;&#76;&#69;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#49;&#125;&#123;&#110;&#125;&#32;&#92;&#115;&#117;&#109;&#32;&#40;&#92;&#108;&#111;&#103;&#40;&#65;&#99;&#116;&#117;&#97;&#108;&#32;&#43;&#32;&#49;&#41;&#32;&#45;&#32;&#92;&#108;&#111;&#103;&#40;&#80;&#114;&#101;&#100;&#105;&#99;&#116;&#105;&#111;&#110;&#32;&#43;&#32;&#49;&#41;&#41;&#94;&#50;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Actual Value: 1000 \u2192 Prediction: 1200<br><p class=\"ql-center-displayed-equation\" style=\"line-height: 22px;\"><span class=\"ql-right-eqno\"> &nbsp; <\/span><span class=\"ql-left-eqno\"> &nbsp; <\/span><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/amirhooshang.com\/blog\/wp-content\/ql-cache\/quicklatex.com-bd025fc937dd1190f2acdcdf28d57936_l3.png\" height=\"22\" width=\"383\" class=\"ql-img-displayed-equation quicklatex-auto-format\" alt=\"&#92;&#91;&#77;&#83;&#76;&#69;&#32;&#8776;&#32;&#40;&#92;&#108;&#111;&#103;&#40;&#49;&#48;&#48;&#49;&#41;&#32;&#45;&#32;&#92;&#108;&#111;&#103;&#40;&#49;&#50;&#48;&#49;&#41;&#41;&#94;&#50;&#32;&#8776;&#32;&#40;&#54;&#46;&#57;&#32;&#45;&#32;&#55;&#46;&#48;&#57;&#41;&#94;&#50;&#32;&#8776;&#32;&#48;&#46;&#48;&#51;&#51;&#92;&#93;\" title=\"Rendered by QuickLaTeX.com\"\/><\/p><\/li>\n<\/ul>\n\n\n\n<p><strong>Pros &amp; Cons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pros:<\/strong> Reduces emphasis on large absolute errors.<\/li>\n\n\n\n<li><strong>Cons:<\/strong> Harder to interpret due to logarithms.<\/li>\n<\/ul>\n\n\n\n<p><strong>Use Case:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Predicting startup revenue growth (from $100 to billions).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Combining Metrics: Why One Metric Isn\u2019t Enough<\/strong><\/h3>\n\n\n\n<p>Relying on one metric is like painting with one eye closed! Combining metrics gives you a broader perspective.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Smart Combinations:<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>MSE + MAE:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>High MSE but low MAE? \u2192 Your model has huge errors in specific outliers.<\/li>\n\n\n\n<li>Example: Predicting luxury home prices \u2192 MSE flags errors in expensive homes, while MAE shows good performance for average homes.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>R\u00b2 + RMSE:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>R\u00b2 shows overall performance; RMSE gives real-world error magnitude.<\/li>\n\n\n\n<li>Example: R\u00b2=0.9 is great, but RMSE=50M might be unacceptable for business.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>MAPE + MSLE:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use for datasets with mixed scales (e.g., $10 apps vs. $50M laptops).<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Practical Example:<\/strong><\/h4>\n\n\n\n<p>If you build a model to predict building electricity consumption:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Using only MSE might hide poor performance in industrial buildings (high consumption).<\/li>\n\n\n\n<li>Combining MSE (absolute error) with MAPE (% error) gives a complete picture.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion: How to Choose the Right Metric?<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Define Your Goal:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Care about % error? \u2192 MAPE.<\/li>\n\n\n\n<li>Need absolute error? \u2192 RMSE.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Understand Your Data:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Many outliers? \u2192 MAE or MAPE.<\/li>\n\n\n\n<li>Wide value ranges? \u2192 MSLE.<\/li>\n<\/ul>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Combine Metrics:<\/strong><\/li>\n<\/ol>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always use 2-3 metrics to avoid blind spots.<\/li>\n<\/ul>\n\n\n\n<p>Remember, there\u2019s no universal &#8220;best&#8221; metric. The right one depends on your problem, data, and business needs!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Regression in machine learning is used to predict continuous values like house prices, tomorrow\u2019s temperature, or someone\u2019s income. But once you\u2019ve built your model, how do you know how accurate&#8230;<\/p>\n","protected":false},"author":1,"featured_media":91,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,62],"tags":[80,83,82,51,81],"class_list":["post-75","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","category-model-evaluation","tag-evaluation-metrics","tag-metric-combination","tag-metric-selection","tag-prediction-error","tag-regression"],"_links":{"self":[{"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":15,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions\/90"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/media\/91"}],"wp:attachment":[{"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amirhooshang.com\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}