Re: [MATH] SimpleRegression - inconsistent use of sumXX?

2015-01-12 Thread Phil Steitz
On 1/12/15 11:46 AM, sebb wrote: > External access to sumXX is via getXSumSquares() > This returns NaN if n < 2. > > However there are some methods in the class that reference sumXX directly. > They don't all check for n < 2 > > For example: > > getSumSquaredErrors > > getInterceptStdErr > > getSl

[MATH] SimpleRegression - inconsistent use of sumXX?

2015-01-12 Thread sebb
External access to sumXX is via getXSumSquares() This returns NaN if n < 2. However there are some methods in the class that reference sumXX directly. They don't all check for n < 2 For example: getSumSquaredErrors getInterceptStdErr getSlopeStdErr getRegressionSumSquares regress(int[] vari

Re: [math] SimpleRegression

2011-08-23 Thread Greg Sterijevski
Alright Phil! Thunder and Lightening! I like it. ;-) On Mon, Aug 22, 2011 at 10:55 PM, Phil Steitz wrote: > On 8/22/11 8:42 PM, Greg Sterijevski wrote: > > If no one has objections, I would like to harmonize simpleregression with > > the Regression Interfaces. What is the best way to proceed? >

Re: [math] SimpleRegression

2011-08-22 Thread Phil Steitz
On 8/22/11 8:42 PM, Greg Sterijevski wrote: > If no one has objections, I would like to harmonize simpleregression with > the Regression Interfaces. What is the best way to proceed? JFDI - go ahead and take a stab at a patch to do it. Phil > > On Sun, Aug 21, 2011 at 9:25 PM, Greg Sterijevski >

Re: [math] SimpleRegression

2011-08-22 Thread Greg Sterijevski
If no one has objections, I would like to harmonize simpleregression with the Regression Interfaces. What is the best way to proceed? On Sun, Aug 21, 2011 at 9:25 PM, Greg Sterijevski wrote: > Opened a ticket. Submitted patches. -Greg > > > On Sat, Aug 20, 2011 at 4:47 PM, Phil Steitz wrote: > >>

Re: [math] SimpleRegression

2011-08-21 Thread Greg Sterijevski
Opened a ticket. Submitted patches. -Greg On Sat, Aug 20, 2011 at 4:47 PM, Phil Steitz wrote: > On 8/12/11 9:30 PM, Phil Steitz wrote: > > On 8/12/11 7:16 PM, Greg Sterijevski wrote: > >> Hello All, > >> > >> Before I chum the water with more JIRA tickets, I thought I would see > >> whether peop

Re: [math] SimpleRegression

2011-08-20 Thread Phil Steitz
On 8/12/11 9:30 PM, Phil Steitz wrote: > On 8/12/11 7:16 PM, Greg Sterijevski wrote: >> Hello All, >> >> Before I chum the water with more JIRA tickets, I thought I would see >> whether people thought this was important. >> >> In the SimpleRegression you have two methods: >> >> public void addData(

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
As soon as you push the other changes, I will update my source and get to work on this... I thought SimpleRegression was a toy example, but after thinking about it, there is much to like about the class. -Greg On Sat, Aug 13, 2011 at 1:16 AM, Phil Steitz wrote: > On 8/12/11 10:59 PM, Greg Steri

Re: [math] SimpleRegression

2011-08-12 Thread Phil Steitz
On 8/12/11 10:59 PM, Greg Sterijevski wrote: > Also, I was thinking that maybe it might be useful to bring SimpleRegression > into line with the other regression techniques and give the user the ability > to constrain the constant to zero? +1 - just make sure to include clear javadoc and tests. P

Re: [math] SimpleRegression

2011-08-12 Thread Phil Steitz
On 8/12/11 10:13 PM, Greg Sterijevski wrote: > One more thing... (ala Detective Colombo). > > In add and remove observation there is a snippet which looks like: > > sumXX += dx * dx * (double) n / (n + 1d); > sumYY += dy * dy * (double) n / (n + 1d); > sumXY += d

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
Also, I was thinking that maybe it might be useful to bring SimpleRegression into line with the other regression techniques and give the user the ability to constrain the constant to zero? -Greg On Sat, Aug 13, 2011 at 12:13 AM, Greg Sterijevski wrote: > One more thing... (ala Detective Colombo)

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
One more thing... (ala Detective Colombo). In add and remove observation there is a snippet which looks like: sumXX += dx * dx * (double) n / (n + 1d); sumYY += dy * dy * (double) n / (n + 1d); sumXY += dx * dy * (double) n / (n + 1d); xbar += dx /

Re: [math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
+1 from me, on all counts! -Greg On Fri, Aug 12, 2011 at 11:30 PM, Phil Steitz wrote: > On 8/12/11 7:16 PM, Greg Sterijevski wrote: > > Hello All, > > > > Before I chum the water with more JIRA tickets, I thought I would see > > whether people thought this was important. > > > > In the SimpleReg

Re: [math] SimpleRegression

2011-08-12 Thread Phil Steitz
On 8/12/11 7:16 PM, Greg Sterijevski wrote: > Hello All, > > Before I chum the water with more JIRA tickets, I thought I would see > whether people thought this was important. > > In the SimpleRegression you have two methods: > > public void addData(double x, double y) { > ...some code that is no

[math] SimpleRegression

2011-08-12 Thread Greg Sterijevski
Hello All, Before I chum the water with more JIRA tickets, I thought I would see whether people thought this was important. In the SimpleRegression you have two methods: public void addData(double x, double y) { ...some code that is not germane to discussion.. if (n > 2) {