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

Notebook 10: MASE result for naive not correct #584

Open
talha-0 opened this issue Sep 17, 2023 · 0 comments
Open

Notebook 10: MASE result for naive not correct #584

talha-0 opened this issue Sep 17, 2023 · 0 comments

Comments

@talha-0
Copy link

talha-0 commented Sep 17, 2023

The mase for naive is not 1.0 because we are triming it 2 times when passing the y_test to evaluate_preds

def mean_absolute_scaled_error(y_true,y_pred):
  """
  Implement MASE (assuming no seasonality of data)
  """
  mae = tf.reduce_mean(tf.abs(y_true-y_pred))
  mae_naive_no_season = tf.reduce_mean(tf.abs(y_true[1:]-y_true[:-1])) # second time

  return mae/mae_naive_no_season
mean_absolute_scaled_error(y_test[1:],naive_forecast).numpy() # first time
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

No branches or pull requests

1 participant