Replies: 2 comments 2 replies
-
|
Hi @Usxcy, thanks so much for the question. From just looking at your code you might be forgetting to instantiate the MLForecast object. Here is a complete guide: https://nixtlaverse.nixtla.io/mlforecast/index.html#visualize-results |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
it is you help that my problem have been solved. think again.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
this is codes
Plot
fig, ax = plt.subplots()
ax.scatter(us_change["Income"], us_change["y"], c="k")
ax.plot(us_change["Income"],
mf.forecast_fitted_values()["LinearRegression"])
Customize the plot
ax.set_xlabel("Income (quarterly % change)")
ax.set_ylabel("Consumption (quarterly % change)")
plt.show()
this is error
NameError Traceback (most recent call last) Cell In[4], line 4 2 fig, ax = plt.subplots() 3 ax.scatter(us_change["Income"], us_change["Consumption"], c="k") ----> 4 ax.plot(us_change["Income"], mf.forecast_fitted_values()["LinearRegression"]) 6 # Customize the plot 7 ax.set_xlabel("Income (quarterly % change)") NameError: name 'mf' is not defined
Beta Was this translation helpful? Give feedback.
All reactions