Challenge
Task
Swipe to start coding
Create an autoregressive model to predict the dataset aapl.csv. After, print the results and the model error.
- Read the
aapl.csvdataset. - Create an autoregressive model (
AutoReg) with 3 lags for theXdata and assign it to themodelvariable. - Fit model to the data and assign it to the
model_fitvariable. - Predict the first 30 values.
- Visualize the results: display the first 30 values of
Xwithin the first call of theprint()function, and first 30 values of thepredictionswithin the second call. - Calculate the RMSE (square root of the mean squared error) and display it.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 4. ChapterΒ 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 3.85
Challenge
Swipe to show menu
Task
Swipe to start coding
Create an autoregressive model to predict the dataset aapl.csv. After, print the results and the model error.
- Read the
aapl.csvdataset. - Create an autoregressive model (
AutoReg) with 3 lags for theXdata and assign it to themodelvariable. - Fit model to the data and assign it to the
model_fitvariable. - Predict the first 30 values.
- Visualize the results: display the first 30 values of
Xwithin the first call of theprint()function, and first 30 values of thepredictionswithin the second call. - Calculate the RMSE (square root of the mean squared error) and display it.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 4. ChapterΒ 5
single