Phil Steitz wrote:
Perhaps it would help if we had overloaded newData methods that accept different input strategies, but ultimately they will produce a n x m double array. That way we can provide users with choice.
I was thinking the same thing. The bit that is troubling me is the omega matrix required by GLS cluttering the OLS interface. Other types of models (e.g. weighted) will require other data. Could be we need separate interfaces for the different types of regression, but maybe it is better to dispense with the abstract interface altogether. The reason we have interface / implementation separation is to allow alternative implementations to be plugged in.

Phil - I created a new issue for this refactor:

https://issues.apache.org/jira/browse/MATH-211

For the moment I kept the MultipleLinearRegression interface as common read-only interface, pushing down the data input to the implementing classes. IMO there is a benefit in maintaining an interface that defines what you obtain from regression, regardless of input and implementation. Also helps with mocking strategies.

The patch attached also incorporates the loadModelData() method that you had used in the OLS tests - ie it's now been pulled to the abstract regression class (renamed to newSampleData() for consistency but we can swap "sample" for "model" - it's just semantics). Tests have been refactored to use new input method.

Cheers



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to