Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

How to resolve this kind of problem in time series?

$
0
0

@omyee wrote:

I have table which consists of duration and dates,The data consists of each day and duration of work . I want to forecast my duration for next 30 days,I’m using arima model for forecasting here.

    table=next_table[['Dates','duration']].sort_values('Dates')
    table.set_index('Dates',inplace=True)
    model = ARIMA(table,order=(1, 0, 1)) 
    fit=model.fit()
    x=fit.predict(start=1,end=5) 

when the prediction is of same length as table it shows dates as index but when when end value increase out of sample .Their is no dates as index instead only integer values appears in place of index .

    output Data:
    2019-12-05     8.322255
    2019-12-06     8.030333
    2019-12-08     7.375191
    2019-12-09     6.446321
    2019-12-10     6.707283

when end is changed x=fit.predict(start=1,end=8)

    1     8.322255
    2     8.030333
    3     7.375191
    4     6.446321
    5     6.707283
    6     5.789473
    7     5.822441
    8     5.854357

I want to show as date instead of integer values and plot it

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles