What’s a good accuracy?

Asked

Viewed 94 times

1

Hello, I’m a young student and I’ve been working alone on a project. The project involves car sales (analyzing the amount of cars sold) from Norway from 2007 to 2016. I wanted to try to create a time series (I used ts), and then use to create a forecast model using Holt-Winters and Forecast.

Um exemplo do dataset

In the temporal series itself was even quiet, follows as it turned out: inserir a descrição da imagem aqui inserir a descrição da imagem aqui

But when I made the prediction, I used the code:

ajuste_HW_CT_CS <- HoltWinters(z)
ajuste_HW_CT_CS
plot(ajuste_HW_CT_CS)


previsao <- forecast(ajuste_HW_CT_CS, h=36)
plot(previsao, main = "Previsão Venda de Carros Noruega 2017 - 2019", xlab = "Anos", ylab = "Quantidade de Carros Vendidos")
previsao 

I thought everything would be fine, follow the image of the forecast: inserir a descrição da imagem aqui

But when using: accuracy(previsao)

I obtained:
inserir a descrição da imagem aqui

Would my model be bad, poorly configured or something? Unfortunately I can’t interpret, could you help me? I don’t know if the dates are too short for training or there should be only one column with the date, but I still don’t know how to do this.

  • Dear @Vitor Resende, your question can be better asked in the Cross Validated of the OS itself, because it is the analytical perspective about a product/result. Anyway, Your example is not reproducible, What prevents me from being able to help you more assertively.

  • However, analyzing the Plot and values of RMSE and MAE, I perceive a high range of forecast and error estimates in the order of 10% of the reference value (observed real, y axis), which I understand as values and cases that can be improved. See if this help you.

  • Do you have any reading you can give on this ? I intend to use in Qliksense.

  • @bbiasi thanks for the link! It will help me a lot to study! I think that’s it then, I will study to try to apply in this project, the language R fascinates me a lot!

  • You can edit the question with the output of dput(dados[1:20, c("Year", "Month", "Quantity")]), please? Images are not a good way to share data and without them we cannot test the code.

  • The Holt-Winters model considers trend, slope and seasonality; the fall in sales between 2008 and 2010 should be responsible for the low accuracy. Consider using another model, such as ARIMA or BATS (both available in the package forecast). Here you go a quick reading, with examples, of different methods. But as already indicated, it is better to ask on Cross Validated, since your doubt is about data analysis and not about programming.

Show 1 more comment

1 answer

0

normally the function accuracy() is used when comparing models, in your case you only used the function for a model. I advise to always do the fac and facp tests to identify the orders of the models, as well as to use the function auto.arima() to check the most adjusted model according to the package’s machine Learning forecast. Once these steps are done, there are two ways to check the best model, follows:

  1. Create a series of training and check that the model is well adjusted to the actual values. This can be done by preserving the last 4 observations, so you test if the forecast approaches the observed values.

  2. The second way is to use the function you used, but comparing the models. Done the steps described above, you can use the function accuracy() in a list of models and see which have the lowest values between tests.

Hug!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.