facebook / facebook/prophet

Not all plots with original values on y axes

Open
#2,450 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20.4k
Forks
4.6k
Avg merge
19h 52m
Merged PRs (30d)
1

Description

Hi All,

I use the following code to forecast and plot multiple unique values (projects).
But, on the Y axxis I would like to have the original values. With some plots this is the case, but some are in log.

How could I achieve my goal?

Side note; the plots that have the original values on the Y axxis, have a strange forecast.

`for i in range(len(data['Nr.'].unique())):
# Initiate the model
m = Prophet(changepoint_prior_scale=0.1, seasonality_prior_scale=5, seasonality_mode='multiplicative')

# Fit the model
m.fit(data[data['Nr.'] == data['Nr.'].unique()[i]])

# Make predictions
future = m.make_future_dataframe(periods=18, freq='MS')
forecast = m.predict(future)


# Plot the forecast
m.plot(forecast)
plt.title(f'Kosten prognose voor project {data["Nr."].iloc[i]}')
plt.xlabel("Datum", fontsize=10)
plt.ylabel("Totale kosten", fontsize=10)
plt.show()`

![image](https://github.com/facebook/prophet/assets/128410731/381007d5-e3a9-4386-b580-d94f5dc4a388)

![image](https://github.com/facebook/prophet/assets/128410731/aa2c9d6c-4dae-499e-9f64-8358fa55c303)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.