Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 80045 invoked from network); 20 Jun 2008 12:07:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Jun 2008 12:07:08 -0000 Received: (qmail 69585 invoked by uid 500); 20 Jun 2008 12:07:09 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 69511 invoked by uid 500); 20 Jun 2008 12:07:09 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 69500 invoked by uid 99); 20 Jun 2008 12:07:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 05:07:09 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-commons-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2008 12:06:18 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1K9fKx-0001IZ-4H for dev@commons.apache.org; Fri, 20 Jun 2008 12:03:27 +0000 Received: from 78-86-158-180.zone2.bethere.co.uk ([78.86.158.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jun 2008 12:03:27 +0000 Received: from mauro.talevi by 78-86-158-180.zone2.bethere.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 20 Jun 2008 12:03:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: dev@commons.apache.org From: Mauro Talevi Subject: Re: [math] Improving numerics in OLSMultipleLinearRegression Date: Fri, 20 Jun 2008 13:03:18 +0100 Lines: 30 Message-ID: References: <484C929C.40004@gmail.com> <484DDA37.60004@gmail.com> <485437EA.3090402@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 78-86-158-180.zone2.bethere.co.uk User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) In-Reply-To: <485437EA.3090402@gmail.com> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org 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