2
$\begingroup$

I am working with a time series data which is generated by accumulating data of every five minutes and reset to 0 by the end of the day. This is the scatter plot of the data. enter image description here

It seems to not matching stationary assumption of traditional time series model, like arima or prophet. I used prophet to make a prediction. But the result shows the model performs badly near 0:00(the prediction near 0:00 is much higher than ground truth). Now I am trying to take the first difference of the data and put them to the model. I wonder if there are any better models or solutions to fit this kind of data. Thank you in advance.

Here is the data

date,y1
2022/6/1 0:00,0.025534482
2022/6/1 0:05,0.046429771
2022/6/1 0:10,0.064790379
2022/6/1 0:15,0.081012709
2022/6/1 0:20,0.095594499
2022/6/1 0:25,0.10867563
2022/6/1 0:30,0.120589211
2022/6/1 0:35,0.131359718
2022/6/1 0:40,0.141249157
2022/6/1 0:45,0.15027672
2022/6/1 0:50,0.158615223
2022/6/1 0:55,0.166271768
2022/6/1 1:00,0.173405206
2022/6/1 1:05,0.179977549
2022/6/1 1:10,0.186100763
2022/6/1 1:15,0.191774297
2022/6/1 1:20,0.197073582
2022/6/1 1:25,0.20201983
2022/6/1 1:30,0.206675439
2022/6/1 1:35,0.211053594
2022/6/1 1:40,0.215199806
2022/6/1 1:45,0.219099168
2022/6/1 1:50,0.222804941
2022/6/1 1:55,0.226326407
2022/6/1 2:00,0.229719356
2022/6/1 2:05,0.23294937
2022/6/1 2:10,0.23606931
2022/6/1 2:15,0.239030527
2022/6/1 2:20,0.241902292
2022/6/1 2:25,0.244676688
2022/6/1 2:30,0.247365702
2022/6/1 2:35,0.249963747
2022/6/1 2:40,0.252500862
2022/6/1 2:45,0.254959202
2022/6/1 2:50,0.25736626
2022/6/1 2:55,0.259724518
2022/6/1 3:00,0.262082122
2022/6/1 3:05,0.264381356
2022/6/1 3:10,0.266691085
2022/6/1 3:15,0.268944194
2022/6/1 3:20,0.271193702
2022/6/1 3:25,0.273424729
2022/6/1 3:30,0.275683192
2022/6/1 3:35,0.277928638
2022/6/1 3:40,0.28021856
2022/6/1 3:45,0.282509016
2022/6/1 3:50,0.284866875
2022/6/1 3:55,0.287270278
2022/6/1 4:00,0.289788416
2022/6/1 4:05,0.292375615
2022/6/1 4:10,0.295078443
2022/6/1 4:15,0.297873333
2022/6/1 4:20,0.300828446
2022/6/1 4:25,0.303919033
2022/6/1 4:30,0.30724964
2022/6/1 4:35,0.310802389
2022/6/1 4:40,0.314621476
2022/6/1 4:45,0.318691539
2022/6/1 4:50,0.323120473
2022/6/1 4:55,0.327904184
2022/6/1 5:00,0.333225957
2022/6/1 5:05,0.33893107
2022/6/1 5:10,0.345142467
2022/6/1 5:15,0.351694261
2022/6/1 5:20,0.358803462
2022/6/1 5:25,0.3663703
2022/6/1 5:30,0.374595664
2022/6/1 5:35,0.383328176
2022/6/1 5:40,0.392608263
2022/6/1 5:45,0.402372529
2022/6/1 5:50,0.412758118
2022/6/1 5:55,0.423709094
2022/6/1 6:00,0.435703006
2022/6/1 6:05,0.448209021
2022/6/1 6:10,0.461432841
2022/6/1 6:15,0.475056288
2022/6/1 6:20,0.489298081
2022/6/1 6:25,0.503930283
2022/6/1 6:30,0.519437209
2022/6/1 6:35,0.535216196
2022/6/1 6:40,0.551623241
2022/6/1 6:45,0.568154532
2022/6/1 6:50,0.585209593
2022/6/1 6:55,0.602408015
2022/6/1 7:00,0.620523896
2022/6/1 7:05,0.638636481
2022/6/1 7:10,0.657085256
2022/6/1 7:15,0.675478656
2022/6/1 7:20,0.694088915
2022/6/1 7:25,0.712567258
2022/6/1 7:30,0.731359973
2022/6/1 7:35,0.749965795
2022/6/1 7:40,0.768787104
2022/6/1 7:45,0.787526231
2022/6/1 7:50,0.806570847
2022/6/1 7:55,0.825634673
2022/6/1 8:00,0.845198223
2022/6/1 8:05,0.864474623
2022/6/1 8:10,0.883815815
2022/6/1 8:15,0.902877566
2022/6/1 8:20,0.922032384
2022/6/1 8:25,0.940980789
2022/6/1 8:30,0.960062618
2022/6/1 8:35,0.978767556
2022/6/1 8:40,0.997476828
2022/6/1 8:45,1.015941461
2022/6/1 8:50,1.034342809
2022/6/1 8:55,1.05256305
2022/6/1 9:00,1.070826871
2022/6/1 9:05,1.088744727
2022/6/1 9:10,1.106557232
2022/6/1 9:15,1.124030603
2022/6/1 9:20,1.141344325
2022/6/1 9:25,1.158368095
2022/6/1 9:30,1.175214693
2022/6/1 9:35,1.191748833
2022/6/1 9:40,1.208255401
2022/6/1 9:45,1.224579817
2022/6/1 9:50,1.240867004
2022/6/1 9:55,1.257046678
2022/6/1 10:00,1.273395825
2022/6/1 10:05,1.289610829
2022/6/1 10:10,1.305705289
2022/6/1 10:15,1.32152168
2022/6/1 10:20,1.337282902
2022/6/1 10:25,1.352859059
2022/6/1 10:30,1.36848937
2022/6/1 10:35,1.384039167
2022/6/1 10:40,1.399573906
2022/6/1 10:45,1.415045591
2022/6/1 10:50,1.430587863
2022/6/1 10:55,1.446117214
2022/6/1 11:00,1.461780828
2022/6/1 11:05,1.477349044
2022/6/1 11:10,1.492966826
2022/6/1 11:15,1.508492236
2022/6/1 11:20,1.524109204
2022/6/1 11:25,1.539669336
2022/6/1 11:30,1.555287342
2022/6/1 11:35,1.570851767
2022/6/1 11:40,1.586524048
2022/6/1 11:45,1.602280944
2022/6/1 11:50,1.618276272
2022/6/1 11:55,1.634395663
2022/6/1 12:00,1.650662691
2022/6/1 12:05,1.666710689
2022/6/1 12:10,1.682869064
2022/6/1 12:15,1.699173473
2022/6/1 12:20,1.715788654
2022/6/1 12:25,1.732602683
2022/6/1 12:30,1.749544678
2022/6/1 12:35,1.766330329
2022/6/1 12:40,1.782935743
2022/6/1 12:45,1.799292064
2022/6/1 12:50,1.815467884
2022/6/1 12:55,1.83136214
2022/6/1 13:00,1.847118813
2022/6/1 13:05,1.862345516
2022/6/1 13:10,1.8771624
2022/6/1 13:15,1.891505544
2022/6/1 13:20,1.905546231
2022/6/1 13:25,1.919283718
2022/6/1 13:30,1.932869306
2022/6/1 13:35,1.946165253
2022/6/1 13:40,1.959217861
2022/6/1 13:45,1.972006885
2022/6/1 13:50,1.984698229
2022/6/1 13:55,1.997275341
2022/6/1 14:00,2.009924404
2022/6/1 14:05,2.022483329
2022/6/1 14:10,2.035010818
2022/6/1 14:15,2.04734124
2022/6/1 14:20,2.059585545
2022/6/1 14:25,2.07166073
2022/6/1 14:30,2.08369203
2022/6/1 14:35,2.09550248
2022/6/1 14:40,2.107220533
2022/6/1 14:45,2.118737696
2022/6/1 14:50,2.130186211
2022/6/1 14:55,2.14149119
2022/6/1 15:00,2.152912683
2022/6/1 15:05,2.164317458
2022/6/1 15:10,2.175668883
2022/6/1 15:15,2.186811764
2022/6/1 15:20,2.19787785
2022/6/1 15:25,2.20881139
2022/6/1 15:30,2.219702322
2022/6/1 15:35,2.230538891
2022/6/1 15:40,2.241405228
2022/6/1 15:45,2.252141076
2022/6/1 15:50,2.262853127
2022/6/1 15:55,2.273513011
2022/6/1 16:00,2.284236985
2022/6/1 16:05,2.294935134
2022/6/1 16:10,2.305656658
2022/6/1 16:15,2.316341568
2022/6/1 16:20,2.327015106
2022/6/1 16:25,2.337594953
2022/6/1 16:30,2.348214567
2022/6/1 16:35,2.358752614
2022/6/1 16:40,2.36946326
2022/6/1 16:45,2.380181959
2022/6/1 16:50,2.39099999
2022/6/1 16:55,2.401857165
2022/6/1 17:00,2.412911927
2022/6/1 17:05,2.423924057
2022/6/1 17:10,2.435102986
2022/6/1 17:15,2.446251055
2022/6/1 17:20,2.457492606
2022/6/1 17:25,2.46874521
2022/6/1 17:30,2.480152977
2022/6/1 17:35,2.491529094
2022/6/1 17:40,2.502930437
2022/6/1 17:45,2.514210014
2022/6/1 17:50,2.525516725
2022/6/1 17:55,2.536775905
2022/6/1 18:00,2.548002022
2022/6/1 18:05,2.559103477
2022/6/1 18:10,2.570191166
2022/6/1 18:15,2.581291432
2022/6/1 18:20,2.592476027
2022/6/1 18:25,2.60366573
2022/6/1 18:30,2.614960103
2022/6/1 18:35,2.626132592
2022/6/1 18:40,2.637345805
2022/6/1 18:45,2.648561795
2022/6/1 18:50,2.659914233
2022/6/1 18:55,2.671375254
2022/6/1 19:00,2.68314099
2022/6/1 19:05,2.694931697
2022/6/1 19:10,2.706786853
2022/6/1 19:15,2.718587192
2022/6/1 19:20,2.730497525
2022/6/1 19:25,2.742389089
2022/6/1 19:30,2.754380024
2022/6/1 19:35,2.766308449
2022/6/1 19:40,2.778221184
2022/6/1 19:45,2.790100066
2022/6/1 19:50,2.802060245
2022/6/1 19:55,2.814083652
2022/6/1 20:00,2.826278854
2022/6/1 20:05,2.838482531
2022/6/1 20:10,2.850715208
2022/6/1 20:15,2.863028648
2022/6/1 20:20,2.875459096
2022/6/1 20:25,2.887889632
2022/6/1 20:30,2.900528337
2022/6/1 20:35,2.913065267
2022/6/1 20:40,2.925526575
2022/6/1 20:45,2.937998897
2022/6/1 20:50,2.950539291
2022/6/1 20:55,2.963100386
2022/6/1 21:00,2.975728541
2022/6/1 21:05,2.988265304
2022/6/1 21:10,3.000839766
2022/6/1 21:15,3.013385859
2022/6/1 21:20,3.025974478
2022/6/1 21:25,3.038445196
2022/6/1 21:30,3.050901532
2022/6/1 21:35,3.063224093
2022/6/1 21:40,3.075414746
2022/6/1 21:45,3.087431681
2022/6/1 21:50,3.099313931
2022/6/1 21:55,3.111004077
2022/6/1 22:00,3.122657864
2022/6/1 22:05,3.134175202
2022/6/1 22:10,3.145446273
2022/6/1 22:15,3.156417918
2022/6/1 22:20,3.167122907
2022/6/1 22:25,3.177497211
2022/6/1 22:30,3.187607237
2022/6/1 22:35,3.197360314
2022/6/1 22:40,3.206780976
2022/6/1 22:45,3.215790815
2022/6/1 22:50,3.224457241
2022/6/1 22:55,3.232746728
2022/6/1 23:00,3.240710614
2022/6/1 23:05,3.248273047
2022/6/1 23:10,3.255463169
2022/6/1 23:15,3.2622672
2022/6/1 23:20,3.26873077
2022/6/1 23:25,3.274803851
2022/6/1 23:30,3.280558729
2022/6/1 23:35,3.285960538
2022/6/1 23:40,3.291080216
2022/6/1 23:45,3.295884437
2022/6/1 23:50,3.300427227
2022/6/1 23:55,3.304722824
2022/6/2 0:00,0.025899817
2022/6/2 0:05,0.047146404
2022/6/2 0:10,0.065573983
2022/6/2 0:15,0.081875263
2022/6/2 0:20,0.096543888
2022/6/2 0:25,0.109698263
2022/6/2 0:30,0.121677722
2022/6/2 0:35,0.13254524
2022/6/2 0:40,0.142503805
2022/6/2 0:45,0.151563441
2022/6/2 0:50,0.159903636
2022/6/2 0:55,0.167591097
2022/6/2 1:00,0.174709811
2022/6/2 1:05,0.181282689
2022/6/2 1:10,0.187440338
2022/6/2 1:15,0.193145259
2022/6/2 1:20,0.198488995
2022/6/2 1:25,0.203463813
2022/6/2 1:30,0.20816183
2022/6/2 1:35,0.212555163
2022/6/2 1:40,0.216712563
2022/6/2 1:45,0.220640655
2022/6/2 1:50,0.224394303
2022/6/2 1:55,0.227958999
2022/6/2 2:00,0.231392696
2022/6/2 2:05,0.234655198
2022/6/2 2:10,0.237803428
2022/6/2 2:15,0.240812488
2022/6/2 2:20,0.243721697
2022/6/2 2:25,0.246526443
2022/6/2 2:30,0.249239198
2022/6/2 2:35,0.251865039
2022/6/2 2:40,0.254430724
2022/6/2 2:45,0.256919525
2022/6/2 2:50,0.259352384
2022/6/2 2:55,0.26173183
2022/6/2 3:00,0.264097988
2022/6/2 3:05,0.266423941
2022/6/2 3:10,0.268744827
2022/6/2 3:15,0.27102427
2022/6/2 3:20,0.273299732
2022/6/2 3:25,0.275568298
2022/6/2 3:30,0.277844637
2022/6/2 3:35,0.280124024
2022/6/2 3:40,0.282451829
2022/6/2 3:45,0.284781429
2022/6/2 3:50,0.287172032
2022/6/2 3:55,0.289623868
2022/6/2 4:00,0.292185402
2022/6/2 4:05,0.294819168
2022/6/2 4:10,0.297583716
2022/6/2 4:15,0.300443551
2022/6/2 4:20,0.303461397
2022/6/2 4:25,0.306645858
2022/6/2 4:30,0.310067984
2022/6/2 4:35,0.313699045
2022/6/2 4:40,0.317621143
2022/6/2 4:45,0.321801136
2022/6/2 4:50,0.326345674
2022/6/2 4:55,0.331245237
2022/6/2 5:00,0.336701025
2022/6/2 5:05,0.342562578
2022/6/2 5:10,0.348921038
2022/6/2 5:15,0.355630652
2022/6/2 5:20,0.362879127
2022/6/2 5:25,0.370583427
2022/6/2 5:30,0.37891142
2022/6/2 5:35,0.387713616
2022/6/2 5:40,0.397137103
2022/6/2 5:45,0.406986002
2022/6/2 5:50,0.417457587
2022/6/2 5:55,0.428486532
2022/6/2 6:00,0.440592745
2022/6/2 6:05,0.453175299
2022/6/2 6:10,0.466506137
2022/6/2 6:15,0.480220329
2022/6/2 6:20,0.494550521
2022/6/2 6:25,0.509232912
2022/6/2 6:30,0.524782733
2022/6/2 6:35,0.540623879
2022/6/2 6:40,0.557054234
2022/6/2 6:45,0.573628205
2022/6/2 6:50,0.590682045
2022/6/2 6:55,0.607798037
2022/6/2 7:00,0.625817666
2022/6/2 7:05,0.643759455
2022/6/2 7:10,0.66197545
2022/6/2 7:15,0.680080589
2022/6/2 7:20,0.698430711
2022/6/2 7:25,0.716588984
2022/6/2 7:30,0.734904758
2022/6/2 7:35,0.752996953
2022/6/2 7:40,0.771208136
2022/6/2 7:45,0.789248865
2022/6/2 7:50,0.807419611
2022/6/2 7:55,0.82564654
2022/6/2 8:00,0.844232035
2022/6/2 8:05,0.862540946
2022/6/2 8:10,0.880858141
2022/6/2 8:15,0.898974213
2022/6/2 8:20,0.917111402
2022/6/2 8:25,0.934988445
2022/6/2 8:30,0.952928885
2022/6/2 8:35,0.970614534
2022/6/2 8:40,0.988234465
2022/6/2 8:45,1.005627249
2022/6/2 8:50,1.022980985
2022/6/2 8:55,1.0401479
2022/6/2 9:00,1.057367079
2022/6/2 9:05,1.074349766
2022/6/2 9:10,1.091165367
2022/6/2 9:15,1.107686029
2022/6/2 9:20,1.123962394
2022/6/2 9:25,1.139905586
2022/6/2 9:30,1.155676759
2022/6/2 9:35,1.171124487
2022/6/2 9:40,1.186524381
2022/6/2 9:45,1.201755281
2022/6/2 9:50,1.217007361
2022/6/2 9:55,1.232178049
2022/6/2 10:00,1.247491754
2022/6/2 10:05,1.262689448
2022/6/2 10:10,1.277837799
2022/6/2 10:15,1.292704154
2022/6/2 10:20,1.307581347
2022/6/2 10:25,1.322323391
2022/6/2 10:30,1.337039795
2022/6/2 10:35,1.351655262
2022/6/2 10:40,1.366287353
2022/6/2 10:45,1.380874027
2022/6/2 10:50,1.395551526
2022/6/2 10:55,1.410211484
2022/6/2 11:00,1.424957455
2022/6/2 11:05,1.439631003
2022/6/2 11:10,1.454363743
2022/6/2 11:15,1.468936491
2022/6/2 11:20,1.483553746
2022/6/2 11:25,1.498017099
2022/6/2 11:30,1.512573495
2022/6/2 11:35,1.527082711
2022/6/2 11:40,1.541715241
2022/6/2 11:45,1.556407064
2022/6/2 11:50,1.571307751
2022/6/2 11:55,1.586310731
2022/6/2 12:00,1.601482944
2022/6/2 12:05,1.616503345
2022/6/2 12:10,1.63159205
2022/6/2 12:15,1.646787701
2022/6/2 12:20,1.662272953
2022/6/2 12:25,1.677875349
2022/6/2 12:30,1.693627944
2022/6/2 12:35,1.709289699
2022/6/2 12:40,1.724803847
2022/6/2 12:45,1.740015643
2022/6/2 12:50,1.755017505
2022/6/2 12:55,1.769758744
2022/6/2 13:00,1.784371426
2022/6/2 13:05,1.79854572
2022/6/2 13:10,1.812315935
2022/6/2 13:15,1.825663531
2022/6/2 13:20,1.838776823
2022/6/2 13:25,1.85162056
2022/6/2 13:30,1.864361159
2022/6/2 13:35,1.876867892
2022/6/2 13:40,1.889157493
2022/6/2 13:45,1.901232566
2022/6/2 13:50,1.913229878
2022/6/2 13:55,1.92515021
2022/6/2 14:00,1.93719791
2022/6/2 14:05,1.949088779
2022/6/2 14:10,1.960881952
2022/6/2 14:15,1.97248808
2022/6/2 14:20,1.984065837
2022/6/2 14:25,1.99548674
2022/6/2 14:30,2.006894778
2022/6/2 14:35,2.018072646
2022/6/2 14:40,2.029181834
2022/6/2 14:45,2.040136482
2022/6/2 14:50,2.05106224
2022/6/2 14:55,2.061890805
2022/6/2 15:00,2.07296294
2022/6/2 15:05,2.083952422
2022/6/2 15:10,2.094854311
2022/6/2 15:15,2.105565006
2022/6/2 15:20,2.116202488
2022/6/2 15:25,2.126712962
2022/6/2 15:30,2.137243308
2022/6/2 15:35,2.147705349
2022/6/2 15:40,2.158177812
2022/6/2 15:45,2.168630787
2022/6/2 15:50,2.179098598
2022/6/2 15:55,2.189519357
2022/6/2 16:00,2.200042543
2022/6/2 16:05,2.210512804
2022/6/2 16:10,2.221014428
2022/6/2 16:15,2.231477243
2022/6/2 16:20,2.241977973
2022/6/2 16:25,2.252393425
2022/6/2 16:30,2.26286011
2022/6/2 16:35,2.273225325
2022/6/2 16:40,2.283662076
2022/6/2 16:45,2.294054871
2022/6/2 16:50,2.304550757
2022/6/2 16:55,2.315040051
2022/6/2 17:00,2.32559409
2022/6/2 17:05,2.336116312
2022/6/2 17:10,2.346689248
2022/6/2 17:15,2.357281578
2022/6/2 17:20,2.36799058
2022/6/2 17:25,2.378690597
2022/6/2 17:30,2.389436709
2022/6/2 17:35,2.400076354
2022/6/2 17:40,2.410723005
2022/6/2 17:45,2.421412129
2022/6/2 17:50,2.432203657
2022/6/2 17:55,2.443041367
2022/6/2 18:00,2.453923425
2022/6/2 18:05,2.464636841
2022/6/2 18:10,2.47530018
2022/6/2 18:15,2.485960207
2022/6/2 18:20,2.496693885
2022/6/2 18:25,2.507438536
2022/6/2 18:30,2.518223879
2022/6/2 18:35,2.528967038
2022/6/2 18:40,2.539704172
2022/6/2 18:45,2.550427028
2022/6/2 18:50,2.561227159
2022/6/2 18:55,2.572075221
2022/6/2 19:00,2.583060178
2022/6/2 19:05,2.594008728
2022/6/2 19:10,2.604998873
2022/6/2 19:15,2.615937025
2022/6/2 19:20,2.626966265
2022/6/2 19:25,2.637963265
2022/6/2 19:30,2.64908827
2022/6/2 19:35,2.66016489
2022/6/2 19:40,2.671304388
2022/6/2 19:45,2.682364903
2022/6/2 19:50,2.693545492
2022/6/2 19:55,2.704789142
2022/6/2 20:00,2.716207451
2022/6/2 20:05,2.727569068
2022/6/2 20:10,2.739004383
2022/6/2 20:15,2.750468723
2022/6/2 20:20,2.762068163
2022/6/2 20:25,2.773648108
2022/6/2 20:30,2.785311184
2022/6/2 20:35,2.796888606
2022/6/2 20:40,2.808518277
2022/6/2 20:45,2.820117765
2022/6/2 20:50,2.831786874
2022/6/2 20:55,2.843453374
2022/6/2 21:00,2.855227338
2022/6/2 21:05,2.866980816
2022/6/2 21:10,2.878745052
2022/6/2 21:15,2.890491707
2022/6/2 21:20,2.902208994
2022/6/2 21:25,2.913830165
2022/6/2 21:30,2.925455981
2022/6/2 21:35,2.936935715
2022/6/2 21:40,2.948316317
2022/6/2 21:45,2.959552864
2022/6/2 21:50,2.970729686
2022/6/2 21:55,2.981771663
2022/6/2 22:00,2.992820424
2022/6/2 22:05,3.003794592
2022/6/2 22:10,3.014655677
2022/6/2 22:15,3.025274317
2022/6/2 22:20,3.035702649
2022/6/2 22:25,3.045851739
2022/6/2 22:30,3.055737674
2022/6/2 22:35,3.065318974
2022/6/2 22:40,3.074626378
2022/6/2 22:45,3.083593329
2022/6/2 22:50,3.092238
2022/6/2 22:55,3.100515477
2022/6/2 23:00,3.108488701
2022/6/2 23:05,3.116148614
2022/6/2 23:10,3.123475018
2022/6/2 23:15,3.130436414
2022/6/2 23:20,3.137095863
2022/6/2 23:25,3.143376163
2022/6/2 23:30,3.149360598
2022/6/2 23:35,3.155014604
2022/6/2 23:40,3.160408153
2022/6/2 23:45,3.165486517
2022/6/2 23:50,3.170322715
2022/6/2 23:55,3.174907203
$\endgroup$

2 Answers 2

3
$\begingroup$

First off, your data is seasonal: you have $24\times 12=288$ buckets per day, and your data repeats essentially daily, so you need to specify a season length attribute (AKA frequency) of 288. Then standard methods should work nicely.

The data you posted contained only two full seasonal cycles, and many packages will not fit a seasonal model unless the data contain more than two cycles, so I simply pasted two copies of your data together for the analyses below.

The simplest method would simply be a seasonal naive forecast: just forecast the last observation in the same time bucket. If you cast this as SARIMA(0,0,0)(0,1,0)[288], you even get prediction intervals:

seasonal naive forecast

Another simple possibility would be to take means per time bucket. I don't think there is a built-in function to do this, though.

Next, SARIMA (seasonal ARIMA) has major problems with "long" seasonalities, and a season length of 288 definitely qualifies. It took my R quite some time to fit a rather straightforward SARIMA(0,1,0)(0,1,0)[288] model:

ARIMA forecast

Another method I like using is seasonal exponential smoothing, but this will be highly unstable for your seasonal length, so forecast::ets rightly refuses to do this.

Finally, you can use a seasonal decomposition method like STLF:

STLF forecast

You may want to take a look at Forecasting: Principles and Practice by Athanasopoulos & Hyndman, 2nd ed. or 3rd ed..

R code:

timeseries <- scan(what="character",sep=",")
date,y1
2022/6/1 0:00,0.025534482
2022/6/1 0:05,0.046429771
2022/6/1 0:10,0.064790379
...

library(forecast)
yy_2 <- ts(rep(as.numeric(timeseries[seq(2,length(timeseries),by=2)]),2),start=c(1,1),frequency=24*12)

plot(snaive(yy_2,h=24*12))

model_arima <- auto.arima(yy_2)
summary(model_arima)
plot(forecast(model_arima,h=24*12))

model_es <- ets(yy_2)

model_stlf <- stlf(yy_2)
summary(model_stlf)
plot(forecast(model_stlf,horizon=24*12))
$\endgroup$
2
  • $\begingroup$ Thanks for your answers. I will try to adjust the season length to fit data. BTW, the data is actually multiple seasonal(daily partten/weekly pattern/annual pattern). Maybe another method should be used to deal with this issue. $\endgroup$ Jun 28 at 6:39
  • $\begingroup$ We have a multiple-seasonalities tag. Its tag wiki contains pointers to possible forecasting algorithms. If you specify the seasonal periods correctly, I would assume they should work fine for your data. $\endgroup$ Jun 28 at 7:30
1
$\begingroup$

Another, more heuristic approach here is to try to model the changes in y1, rather than the actual values, e.g.

library(tidyverse)
library(lubridate)
df = clipr::read_clip_tbl(sep = ',') # Read data from clipboard
df = df %>%
  mutate(date = parse_date_time(date, '%y/%m/%d %R')
         day = floor_date(date, 'days'),
         time = difftime(date, day, units = 'hours')) %>%
  group_by(day) %>%
  mutate(delta = y1 - lag(y1)) %>%
  ungroup()

ggplot(df, aes(time, delta, color = factor(day))) + geom_path()

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.