Is there a Java library for better linear regression? (E.g., iteratively reweighted least squares) [closed]

夙愿已清 提交于 2019-11-28 07:01:58

问题


I am struggling to find a way to perform better linear regression. I have been using the Moore-Penrose pseudoinverse and QR decomposition with JAMA library, but the results are not satisfactory. Would ojAlgo be useful? I have been hitting accuracy limits that I know should not be there. The algorithm should be capable of reducing the impact of an input variable to zero. Perhaps this takes the form of iteratively reweighted least squares, but I do not know that algorithm and cannot find a library for it. The output should be a weight matrix or vector such that matrix multiplication of the input matrix by the weight matrix will yield a prediction matrix. My input matrix will almost always have more rows than columns. Thank you for your help.


回答1:


I don't fully understand your question, but I've used Apache Commons Math to do linear regressions before.




回答2:


If you want to use a more generic external tool for this, use Octave. I think it's more suitable for these kind of things. If not, take a look to:

Logistic Regression in Java Specifically: http://commons.apache.org/math/userguide/overview.html

or http://mallet.cs.umass.edu/optimization.php

http://mahout.apache.org/



来源:https://stackoverflow.com/questions/8406305/is-there-a-java-library-for-better-linear-regression-e-g-iteratively-reweigh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!