commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Talevi <mauro.tal...@aquilonia.org>
Subject Re: [math] Improving numerics in OLSMultipleLinearRegression
Date Fri, 20 Jun 2008 12:03:18 GMT
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: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message