commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mauro Talevi <>
Subject Re: [math] Multiple regression "addData" methods
Date Mon, 09 Jun 2008 06:10:44 GMT
Phil Steitz wrote:
> I think these methods should be named "setData."  They have a different 
> contract from "addData" in SimpleRegression, which does not replace 
> observations that have previously been added.  If there are no 
> objections, I will make that change.

Yes - It makes sense to be consistent wrt to SimpleRegression.  The 
addData was left to mirror as much as possible the simple case but it is 
true that the effect is different.

Alternatively, an even more expression name could be "newData" (and 
"newX/YSampleData" correspondingly in the abstract method) so it's clear 
that the user is resetting previously set data.

Another alternative is to introduce a clear() method.

My personal preference would probably be for "newData" but any of the 3 
options is fine.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message