/Time Series Analysis #15 Secret
Created
March 24, 2021 16:20
Time Series Analysis and Sales Forecasting for Automotive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mean_percentage_error(y_true, y_pred): | |
return 100*np.mean((y_true - y_pred) / y_true) | |
print('MAE: \t{0:.1f}'.format(mean_absolute_error(test, forecasts))) | |
print('MSE: \t{0:.1f}'.format(mean_squared_error(test, forecasts))) | |
print('RMSE: \t{0:.1f}'.format(np.sqrt(mean_squared_error(test, forecasts)))) | |
print('MAPE: \t{0:3.4f} %'.format(mean_percentage_error(test, forecasts))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment