See, now you're heading in a direction i've long since
forgotten (now i feel old beeing that far removed from
college).  If you'd like me to send the coefficient matrix,
YEst and the Residuals back in matrix form, i can do that.
Is that what you mean by a "pure matrix" based implementation?

I'm also more than happy to build in a method like:
        public double predict(double x[]);
or
        public double predict(RealMatrix x);

and i could use the LinearFunction class behind the
scenes to implement this algorithm.

Does that make sense?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 28, 2004 2:16 PM
To: [EMAIL PROTECTED]
Subject: RE: [math] Re: - Multiple Linear Regression


Here's a little snippet on linear regression:
http://www.mathworks.com/access/helpdesk/help/toolbox/stats/linear20.shtml#4
9537

The first equation is the common form (in matrix terms) of a linear
model.  It also defines residuals and other important points regarding
multiple regression.

The nice thing about linear models, is not only are they used for
regression analysis, but they are the basis for ANOVA as well.  So, I
for one, would like to see a pure matrix based implementation for
linear regression as it more likely reuseable for ANOVA.

Also, we can add a facade to the matrix implementation for those whole
just want to deal with double[] and double[][] structures.  Much like
we've done with the summary stats.

Take note of the hat matrix.  Some more advanced analysis like
measuring the effect of an observation can be easily accomplished
using the hat matrix.  So, it might be worth while to incorporate
caching of the hat matrix in any implementation.

On Wed, 28 Jan 2004 12:46:32 -0500, "Inger, Matthew" wrote:

> 
> by "model" are you referring to the "LinearRegressionResults"
> class I had mentioned?  I'm also no statistical guru.  I can get
> around where i need to, but i'm not sure what the "score" method
> and "residuals" method is.  I'm guessing you might be referring to
> some of the linear regression statistics.  A little clearer
explantion
> would help.  I could submit what i have, and whomever can do the
commit
> might want to take these things into account, and possibly refactor
> things a bit.  I'm mainly concerened (for my project) with the
> coefficient
> matrix and predictions, but decided to go the extra step of computing
> all the statistics that go along with it (figuring the community
would
> have use for them).

Brent Worden
http://www.brent.worden.org/

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

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

Reply via email to