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

Forecast Evaluator - fixes SMAPE, adds MASE and Seasonal Error metrics #342

Merged
merged 20 commits into from
Jul 2, 2019

Conversation

wsuchy
Copy link
Contributor

@wsuchy wsuchy commented Jun 24, 2019

Fixed SMAPE and added seasonal error and MASE.
Computation is done locally due to the way the seasonal error is being calculated.

@codecov
Copy link

codecov bot commented Jun 24, 2019

Codecov Report

Merging #342 into master will decrease coverage by 7.83%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #342      +/-   ##
==========================================
- Coverage   86.65%   78.82%   -7.84%     
==========================================
  Files         335      335              
  Lines       10763    10781      +18     
  Branches      344      335       -9     
==========================================
- Hits         9327     8498     -829     
- Misses       1436     2283     +847
Impacted Files Coverage Δ
...m/salesforce/op/evaluators/EvaluationMetrics.scala 86.66% <ø> (ø) ⬆️
...salesforce/op/evaluators/OpForecastEvaluator.scala 96.42% <100%> (+6.42%) ⬆️
...stages/impl/feature/TimePeriodMapTransformer.scala 0% <0%> (-100%) ⬇️
...stages/impl/feature/GeolocationMapVectorizer.scala 0% <0%> (-100%) ⬇️
...scala/com/salesforce/op/utils/numeric/Number.scala 0% <0%> (-100%) ⬇️
...alesforce/op/aggregators/TimeBasedAggregator.scala 0% <0%> (-100%) ⬇️
...p/stages/impl/feature/OpScalarStandardScaler.scala 0% <0%> (-100%) ⬇️
.../impl/feature/UrlMapToPickListMapTransformer.scala 0% <0%> (-100%) ⬇️
...e/op/stages/impl/insights/RecordInsightsCorr.scala 0% <0%> (-98.25%) ⬇️
...e/op/stages/impl/selector/RandomParamBuilder.scala 0% <0%> (-94.45%) ⬇️
... and 57 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afc910c...6d217d2. Read the comment docs.

@tovbinm
Copy link
Collaborator

tovbinm commented Jun 27, 2019

if SeasonalAbsDiff is not associative, then how are you planning to reduce on it? Spark does not guarantee an order.

@wsuchy
Copy link
Contributor Author

wsuchy commented Jun 28, 2019

if SeasonalAbsDiff is not associative, then how are you planning to reduce on it? Spark does not guarantee an order.

@tovbinm Therefore I am using fold (with coealesce(1)) instead of reduce which makes me wonder if doing that math on spark makes still sense...

var smapeSum = 0.0

while (i < cnt) {
val r = rows(i)
Copy link
Collaborator

Choose a reason for hiding this comment

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

val (y, yHat) = rows(i)

Copy link
Collaborator

@tovbinm tovbinm left a comment

Choose a reason for hiding this comment

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

lgtm!

@tovbinm tovbinm changed the title Forecast Evaluator - more changes Forecast Evaluator - fixes SMAPE, adds MASE and Seasonal Error metrics Jul 2, 2019
@tovbinm tovbinm merged commit ecc7f22 into master Jul 2, 2019
@tovbinm tovbinm deleted the ks/forecastEvaluator branch July 2, 2019 21:32
This was referenced Jul 10, 2019
@salesforce-cla
Copy link

salesforce-cla bot commented Dec 9, 2020

Thanks for the contribution! Before we can merge this, we need @wsuchy to sign the Salesforce.com Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants