用于自动回归 (AR)、ARIMA、时间序列分析的 Java API
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22140180/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Java API for Auto regression (AR), ARIMA, Time Series Analysis
提问by rkmalaiya
I am looking for either Opensource or Free Java API for Time Series Analysis using AR, ARIMA etc. I need this api for DDOS Attack analysis. I googled around and found 2 solutions but both are not completely solving the problem:
我正在寻找使用 AR、ARIMA 等进行时间序列分析的开源或免费 Java API。我需要这个 api 进行 DDOS 攻击分析。我用谷歌搜索并找到了 2 个解决方案,但都没有完全解决问题:
1) This same question was asked earlier in stackoverflowand a solution was posted regarding SuanSu Apibut this API is not free
1) 之前在stackoverflow中提出了同样的问题,并且发布了关于SuanSu Api的解决方案,但此 API 不是免费的
2) Apache Math Library, but this API provides other forms of Regression like Simple, OLS, GLS etc but not Auto Regression.
2) Apache Math Library,但此 API 提供了其他形式的回归,如 Simple、OLS、GLS 等,但不提供自动回归。
I checked for Options in Machine Learning apis like Mahout but not luck yet. Please suggest an appropiate API
我检查了像 Mahout 这样的机器学习 API 中的选项,但还没有运气。请推荐合适的API
采纳答案by Paul Connolly
I spent my 4th year Computing project on implementing time series forecasting for Java heap usage prediction using ARIMA, Holt Winters etc, so I might be in a good position to advise you on this.
我在第 4 年的计算项目中使用 ARIMA、Holt Winters 等为 Java 堆使用预测实施时间序列预测,因此我可能会在这方面为您提供建议。
Your best option by far is using the R language, you can call on the forecasting libraries provided by R, through Java by using the JRI library found here. R is well documented, free and open source. You can even run R on a server and then make calls to it via command line using Rserve, which then returns forecasts over HTTP but JRI is the local equivalent if memory serves me correctly.
到目前为止,您最好的选择是使用 R 语言,您可以使用此处找到的 JRI 库通过 Java 调用 R 提供的预测库。R 是有据可查的、免费的和开源的。您甚至可以在服务器上运行 R,然后使用 Rserve 通过命令行调用它,然后通过 HTTP 返回预测,但如果内存正确地为我服务,JRI 是本地等效项。
If you have any questions, let me know.
如果您有任何问题,请告诉我。
回答by jmrachiele
Have a look at spark-timeseries. The source code is mostly Scala, but it's relatively simple to use the library from within Java. If you're in a place where you are doing time series analysis on the JVM, then you should consider learning Spark/Scala anyways.
看看spark-timeseries。源代码主要是 Scala,但在 Java 中使用该库相对简单。如果您在 JVM 上进行时间序列分析,那么无论如何您都应该考虑学习 Spark/Scala。
The library is young as of this writing and has room for improvement and growth, but as of version 0.3 it implements AR, ARIMA, simple exponential smoothing (EWMA), and Holt-Winters smoothing. It's areas for improvement are a better automatic ARIMA algorithm, support for seasonal ARIMA, and state space modeling, but it's already very useful.
在撰写本文时,该库还很年轻,还有改进和增长的空间,但从 0.3 版本开始,它实现了 AR、ARIMA、简单指数平滑 (EWMA) 和 Holt-Winters 平滑。它的改进领域是更好的自动 ARIMA 算法、对季节性 ARIMA 的支持和状态空间建模,但它已经非常有用。