Out of bounds indexing error in R programming
Getting the following error while using the library prophet
:
Error in
[<-
(*tmp*
, m $ history $ t> = m $ changepoints.t [i], i, value = 1): index out of bounds
Code: m <- prophet(data)
This data is loaded from a csv file.
My dataset looks like this:
ds y
1 2017-05-23 08:07:00 21.16641
2 2017-05-23 08:07:10 16.79345
3 2017-05-23 08:07:20 16.40846
4 2017-05-23 08:07:30 16.24653
5 2017-05-23 08:07:40 16.14694
6 2017-05-23 08:07:50 15.89552
Column ds
is of the following type: "POSIXct" "POSIXt"
Column y
is of the following type: "numeric"
(these are the logarithmic values โโof some of the count values)
Being new to R, I have no idea how to solve this. Please, help.
source to share
There are no points of change in your data (points of interest in your data series where changes in the local trend occur). This error appears to be a bug in the Prophet package, which does not handle this situation gracefully. However, you can fix this by adjusting the forwarding point settings.
Quick fix: set changepoints to 0 with the parameter:
n.changepoints = 0
in your prophet request.
source to share