commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <stei...@yahoo.com>
Subject Re: [math] Re: - Multiple Linear Regression
Date Wed, 28 Jan 2004 00:08:23 GMT

--- Piotr Kochański <pi@uw.edu.pl> wrote:
> Inger, Matthew napisał(a):
> 
> > returning a RealMatrix for the coefficients doesn't make sense
> > to me, since a matrix implies N x M dimensions, and the coefficient
> > matrix has a fixed number of rows (1). 

A row matrix is a perfectly good matrix!

 I'd rather return an double[]
> > instance.  However, that array is available through LinearFunction
> > as i have outlined it below, so it's not really hard to get to it:
> > 
> > results.getFuntion().getCoefficients();
> 
> This way of obtaining coefficients might be natural and elegant
> for a Java programmer, but I think that average statistician would
> prefere to get them in a simpler way, without digging through
> interfaces, methods, etc. just to find such a basic result.
> 
> As I understand rationale behind returning RealMatrix is that
> there is a number of usefull methods that makes manipulation
> with the result easier, but I would not complain if I get double[],
> I would not have to think about some additional interface (RealMatrix).
> In addition double[] can be easily converted to RealMatrix if it is
> needed.

I am fine with returning a double[].  The coefficients are the important
thing.  The matrix representation is natural (to me at least) because the
estimated regression model is a linear transformation.

It is not obvious to me what is the best way to think about / represent
multivariate real functions generally, or under what circumstances we
actually need them (since that will determine how best to represent them). 
Matrices should be used to represent linear transformations, IMHO, since in
addition to evaluation, they expose all of the structure.  That is what I
meant above.

Phil
 

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message