I suggested the following grammar to aim for in our meeting today with the developing OLS module. If you see anything you'd prefer to change let's establish it now , if anyone doesn't like it later, it's on me.
RegressionData data = RegressionDataLoader.of(double[][] y, double[] x); Regression ols = new OLSRegression(); RegressionResults results = ols.regress(data); betas = results.getBetas() ; where: RegressionData is an interface RegressionDataLoader is a factory class and of() a (possibly overloaded) static method Regression is an interface, implemented by OLSRegression RegressionResults is an interface, the specific class returned is OLSResults which implements it. betas are the intercept and slopes of the regression model I think this preserves abstraction at the levels desired, since we will want in future flexibility as to regression type, posslble state parameters set on the regression object, and results contents and format. But also doesn't take on any unnecessary abstractions. Eric