Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to forecast problem in spark arima? #199

Open
jinxiu2216 opened this issue Sep 29, 2017 · 1 comment
Open

How to forecast problem in spark arima? #199

jinxiu2216 opened this issue Sep 29, 2017 · 1 comment

Comments

@jinxiu2216
Copy link

Hi,
I have got TimeSeriesRDD in spark, but I don't know how to get the forecast.

val rdd = sc.textFile(path).map { line =>
val tokens = line.split(",")
val series = new DenseVector(tokens.tail.map(_.toDouble))
(tokens.head, series.asInstanceOf[Vector])
}

val start = ZonedDateTime.of(2015, 4, 9, 0, 0, 0, 0, ZoneId.of("Z"))
val index = uniform(start, 250, new DayFrequency(1))
val tsRDD = new TimeSeriesRDD(index, rdd);
val arimaModel = tsRDD.map(tuple => (tuple._1, ARIMA.fitModel(1,0,1,tuple._2)))

Thanks

@jinxiu2216 jinxiu2216 changed the title forecast problem in spark arima How to forecast problem in spark arima Sep 30, 2017
@jinxiu2216 jinxiu2216 changed the title How to forecast problem in spark arima How to forecast problem in spark arima? Sep 30, 2017
@debasish83
Copy link

Forecast API we can add it...idea is that we use one-step ahead prediction and then add the predicted point back to the time-series to predict the next step...as the prediction horizon increases error will be impacted...are you looking into specific problem ?? The current ARIMA model can be used with a ringbuffer support...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants