Question: Time series-forecast-Python Questions: Have data from 2018-07 to 2020-10, now need to use the history to forecast the future period of data to have the
Time series-forecast-Python
Questions:
Have data from 2018-07 to 2020-10, now need to use the history to forecast the future period of data to have the lowest MAPE value, You can change the parameter,'time series', 'changepoint_prior_scale', 'seasonality_mode', 'growth', 'model, horizon'. How can I get the reasonable and lower MAPE value?
below is the code:
# Remove history is_limitedHistory=timeSeries['ds']>='2020-01-01' timeSeriesLimitedHistory=timeSeries[is_limitedHistory]
# Tune and calculate MAPE model = Prophet(changepoint_prior_scale=0.077, seasonality_mode='multiplicative', growth='linear') model.fit(timeSeriesLimitedHistory) validationData = cross_validation(model, horizon='35 days', cutoffs=forecast_start) errorMetrics = performance_metrics(validationData) MAPE=errorMetrics['mape'].mean(axis=0) MAPE

le6 4 3 2 1 0 2018-07 2018-10 2019-01 2019-04 2019-07 2020-01 2020-04 2020-07 2020-10 2019-10 ds le6 4 3 2 1 0 2018-07 2018-10 2019-01 2019-04 2019-07 2020-01 2020-04 2020-07 2020-10 2019-10 ds
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
