Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 89620 invoked from network); 13 Jul 2009 17:27:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jul 2009 17:27:24 -0000 Received: (qmail 23745 invoked by uid 500); 13 Jul 2009 17:27:33 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 23653 invoked by uid 500); 13 Jul 2009 17:27:32 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 23643 invoked by uid 99); 13 Jul 2009 17:27:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 17:27:32 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sujit.pal@comcast.net designates 76.96.62.32 as permitted sender) Received: from [76.96.62.32] (HELO QMTA03.westchester.pa.mail.comcast.net) (76.96.62.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jul 2009 17:27:21 +0000 Received: from OMTA14.westchester.pa.mail.comcast.net ([76.96.62.60]) by QMTA03.westchester.pa.mail.comcast.net with comcast id FTBF1c03S1HzFnQ53VT0mz; Mon, 13 Jul 2009 17:27:00 +0000 Received: from [10.1.1.36] ([208.106.108.2]) by OMTA14.westchester.pa.mail.comcast.net with comcast id FVSr1c00J038EM43aVStDZ; Mon, 13 Jul 2009 17:26:58 +0000 Subject: Re: Basic Maths Help From: Sujit Pal Reply-To: sujit.pal@comcast.net To: Commons Users List In-Reply-To: <8396f8260907130925hb7707aevcc18b1f7c3910519@mail.gmail.com> References: <8396f8260907130925hb7707aevcc18b1f7c3910519@mail.gmail.com> Content-Type: text/plain Organization: Personal Date: Mon, 13 Jul 2009 10:26:50 -0700 Message-Id: <1247506010.25410.4.camel@lysdexic.healthline.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-8.el5_2.3) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Graham, You want multiple linear regression. Check out this page from the commons-math docs. http://commons.apache.org/math/userguide/stat.html#a1.5_Multiple_linear_regression HTH Sujit On Mon, 2009-07-13 at 17:25 +0100, Graham Smith wrote: > Hi, > > I'm hoping that someone with a bit more maths knowledge than I have can help > me with my current problem. I've got a data set that contains the daily > closing price for a number of different stocks. What I want to do is find an > equation that fits those points and then use it to predict the future price. > > In the past I've written an application that did a simple least squares > linear regression (what is handled by the SimpleRegression class I believe) > e.g. finding a line of best fit with the formula y = mx + c. What I need now > is something that can give me a formula of y = ax^n + bx^n-1 .... mx + c > where I can choose n, the number of terms. > > I think this can be handled by general least squares but the simple case I > implemented in the past was already pushing my understanding of maths. Is > this what the GLSMultipleLinearRegression class does? If so what do I need > to read up on to understand it? > > Many thanks, > Graham --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org