2

I am using OLSMultipleLinearRegression from Apache Commons Math in order to do curve fitting and it works pretty well and is really performant. However, this way I get an overfit as all variables are included in the model. Simply deleting the least predictive independent variables does not solve the problem.

Question: I am looking for a stepwise regression procedure in Java or information how to implement this with Apache Commons Math. I need a pure Java solution, so I cannot use R.

f_puras
  • 2,521
  • 4
  • 33
  • 38
  • Take a look at http://www.codeproject.com/Articles/566326/Multi-Linear-Regression-in-Java. It includes a source zip but requires a login account which is free and quick to setup. Another option is RogueWave's IMSL Java Numerical Library which has a StepWiseRregression class (docs.roguewave.com/imsl/java/5.0.1/api/com/imsl/stat/StepwiseRegression.html). Its not free but they offer a free eval (http://www.roguewave.com/products-services/request-evaluation). –  Jul 11 '15 at 22:26
  • Thanks a lot for the tipps. I had already seen RegueWave-Lib which seems to offer really a lot. The downside: My project is open source and therefore there are license issues. The Code-Project link is as well very good for multi linear regression, but does not include stepwise regression either. – Wolfgang Lenhard Jul 12 '15 at 09:19

0 Answers0