Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAPE: multiply by 100 #7038

Merged
merged 2 commits into from
Feb 21, 2025
Merged

MAPE: multiply by 100 #7038

merged 2 commits into from
Feb 21, 2025

Conversation

ajdapretnar
Copy link
Contributor

Issue

Fixes #7032.

Description of changes

Multiply MAPE by 100.

Includes
  • Code changes
  • Tests
  • Documentation

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.70%. Comparing base (0d9bdcc) to head (14fe0e4).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7038      +/-   ##
==========================================
- Coverage   88.70%   88.70%   -0.01%     
==========================================
  Files         332      332              
  Lines       73363    73366       +3     
==========================================
+ Hits        65074    65076       +2     
- Misses       8289     8290       +1     

def test_mape_percentage(self):
res = CrossValidation(k=3)(
self.housing, [LinearRegressionLearner()])
self.assertGreater(MAPE(res), 1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily true in general, but apparently true for housing. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, however, it is very difficult to test whether something is truly in the range of 0-100 and not 0-1. :)

@janezd janezd merged commit 0a43fd4 into biolab:master Feb 21, 2025
27 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Predictions / Test & Score: MAPE of linear regression returns fraction rather than percentage
2 participants