Codrut
Codrut

Reputation: 473

facebook prophet predict value at fixed date in the future

I want to do something like:

predicted_value = Prophet.predict_some_value('2020-12-12 14:47:00')

where the date is some future date and produce only one value.

Is there a way to predict only the value at a certain date in the future using Facebook Prophet?

Upvotes: 2

Views: 1149

Answers (1)

Codrut
Codrut

Reputation: 473

I found the answer after reading the documentation more carefully.

First we need to generate a DataFrame containing the date we want to predict the value for:

future_date = pd.DataFrame({'ds':['2020-08-15 7:55:30']})

Then just use the predict method of the fitted model:

forecast = my_model.predict(future_date)

Upvotes: 3

Related Questions