[jira] Created: (MATH-173) One-way ANOVA

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (MATH-173) One-way ANOVA

JIRA jira@apache.org
One-way ANOVA
-------------

                 Key: MATH-173
                 URL: https://issues.apache.org/jira/browse/MATH-173
             Project: Commons Math
          Issue Type: New Feature
    Affects Versions: Nightly Builds
            Reporter: Bob MacCallum


Here is some proposed code to add one-way ANOVA tests to commons-math

I will be attaching

src/test/org/apache/commons/math/stat/inference/AnovaTest.java
src/java/org/apache/commons/math/stat/inference/Anova.java
src/java/org/apache/commons/math/stat/inference/AnovaImpl.java

I followed TTest as a style guide.


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MATH-173) One-way ANOVA

JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob MacCallum updated MATH-173:
-------------------------------

    Attachment: AnovaTest.java
                AnovaImpl.java
                Anova.java

Files are uploaded in this order

src/java/org/apache/commons/math/stat/inference/Anova.java

src/java/org/apache/commons/math/stat/inference/AnovaImpl.java

src/test/org/apache/commons/math/stat/inference/AnovaTest.java


> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542472 ]

Bob MacCallum commented on MATH-173:
------------------------------------

One thing missing is safely handling NaN and Inf in the double[] arrays passed to the ANOVA routine.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated MATH-173:
-----------------------------

    Fix Version/s: 1.2

This looks good.  There is some jdk 1.5-dependent code (loop over keys), some documentation missing, and we should carefully review the API (is HashTable best to represent class data?), but I would like to see if we can get this into 1.2.

One important issue.  The javadoc says the impl was "translated from perl."   I assume the ASL header attached means that the author has full right to contribute this code.  Will need confirmation from contributor.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543510 ]

Bob MacCallum commented on MATH-173:
------------------------------------

Thanks Phil.  I can address all those issues once some consensus has been reached on the API (as a Perl person I would naturally gravitate to hash tables).

Yes I wrote the Perl code, will make that clear next time I work on the docs.  Although is this evolutionary coding history really necessary I wonder?  If it behaves as it should do that's mostly irrelevant...



> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557172#action_12557172 ]

Luc Maisonobe commented on MATH-173:
------------------------------------

I would also prefer to use a Collection rather than a HashTable. The keys seems not to be used at all in this code, except for iterating. This would still allow the caller to use a HashTable and pass Hashtable.values() as the argument to these methods.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557515#action_12557515 ]

Phil Steitz commented on MATH-173:
----------------------------------

I think the keys are relevant. IIUC, these name the classes.  A more flexible alternative to HashTable is to just use a Map in the interface and HashMap in implementation.  This is still a little smelly though, because the implementation requires that the map entries be double[] arrays.  It might be best to define a new class to represent the classdata, which is essentially a map of double arrays.  This might be useful for other things as well.  Interested in other opinions on this.

There is no need to document the code lineage.  What I meant above was just that you need to be able to contribute it freely. Since you are the author, it makes no difference that it is translated from Perl (as long as you have rights to it).

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557665#action_12557665 ]

Phil Steitz commented on MATH-173:
----------------------------------

After thinking about this some more, I think Luc may be right that the best is just Collection.  I don't think we need to get into managing the class names or defining new data structures for this.  I would also be OK with Map.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557685#action_12557685 ]

Bob MacCallum commented on MATH-173:
------------------------------------

Thanks for the comments.

I'm not a apache.commons veteran... does the final version need to be compilable by jdk 1.4?  If so, could you remind me how I tell ant to compile it that way using 1.5 or 1.6?  Removing the loop over keys etc should be no problem.

Map vs. Collection:  the former (with named classes) is only useful if you want useful error message: "class XYZ had too few data values" as opposed to "one of your classes had too few data values".  That doesn't seem to be a deal breaker for me.

I'll remove all the generics from the test class and other 1.5+ code.

It's not too much work, so I can make the changes, but I would appreciate a checklist of all that needs doing :-)  Or does someone else want to do it?


> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Issue Comment Edited: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557808#action_12557808 ]

luc edited comment on MATH-173 at 1/10/08 1:38 PM:
-------------------------------------------------------------

Our current policy is to be able to compile it with jdk 1.3. I think this can be done with ant using properties ant.build.javac.source and ant.build.javac.target.

If you really want to associate a name for the error messages, then rather than relying on a map that both does the association and is a container for the double array, then I would prefer a collection of Category such as :
public interface Category {
  public double[] getData();
  public String getName();
}

with a default implementation that simply uses two attributes. I have used the name Category because Class is already used in Java, but this name could really be changed to something more suited.

This would separate the name/data association feature from the multiple category feature. I also think it is cleaner than using simple arrays of double since the abstraction level is higher. Of course, the interface could also be even improved with methods like getSampleSize() or things like that.

      was (Author: luc):
    Our current policy is to be able to compile it with jdk 1.3. I think this can be done with ant using properties ant.build.javac.source and ant.build.javac.target.

If you really want to associate a name for the error messages, then rather than relying on a map that both does the association and is a container for the double array, then I would prefer a collection of Category such as :
public interface Category {
  public double[] getDate();
  public String getName();
}

with a default implementation that simply uses two attributes. I have used the name Category because Class is already used in Java, but this name could really be changed to something more suited.

This would separate the name/data association feature from the multiple category feature. I also think it is cleaner than using simple arrays of double since the abstraction level is higher. Of course, the interface could also be even improved with methods like getSampleSize() or things like that.
 

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557808#action_12557808 ]

Luc Maisonobe commented on MATH-173:
------------------------------------

Our current policy is to be able to compile it with jdk 1.3. I think this can be done with ant using properties ant.build.javac.source and ant.build.javac.target.

If you really want to associate a name for the error messages, then rather than relying on a map that both does the association and is a container for the double array, then I would prefer a collection of Category such as :
public interface Category {
  public double[] getDate();
  public String getName();
}

with a default implementation that simply uses two attributes. I have used the name Category because Class is already used in Java, but this name could really be changed to something more suited.

This would separate the name/data association feature from the multiple category feature. I also think it is cleaner than using simple arrays of double since the abstraction level is higher. Of course, the interface could also be even improved with methods like getSampleSize() or things like that.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557925#action_12557925 ]

Simon Kitching commented on MATH-173:
-------------------------------------

Re compatibility with java 1.3:

The javac compiler option -source (presumably same as ant.build.javac.source) just ensures that no *language features* beyond the specified version are used, eg autoboxing or 'for (String x:arrayOfStrings)' or annotations. But it does NOT check whether you are using apis that did not exist in the runtime lib for the specified version.

The -target option (presumably ant.build.javac.target) just ensures that the generated bytecode format is compatible with the specified target version.

In order to check whether code is compatible with version x, you really need to compile against the runtime libraries for version x; it should be possible to compile with java1.5 but using the libs from 1.3 for example. But in practice just using java1.3 is probably easier.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557972#action_12557972 ]

Bob MacCallum commented on MATH-173:
------------------------------------

Re: class vs. category - I will definitely go for category (e.g. categorydata) - I actually already use "category" in the upstream code I needed ANOVA for because class was too confusing.

I would happily just go with "Collection of double[]" if it means avoiding the addition of a new Category Interface and Class simply to wrap a name and double[] together.   I don't fully understand the sentence "This would separate the name/data association feature from the multiple category feature." could you explain please?

Would the API accept a Collection (of anything) and the arg checking code would ensure the collection contained all double[] or all Category?  In that case we could start with Collection (of double[]) and add the ability to handle named data in future versions (if required) without breaking anything.

I probably understand that sentence now.

Thanks for the 1.3 help!

What are the deadlines for this?

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12557995#action_12557995 ]

Luc Maisonobe commented on MATH-173:
------------------------------------

Sorry for my bad explanation, I am not a native english speaker and I often write confusing things.

What I meant was that the original HashTable seemed to have two purposes/features :
 - provide a name versus data array mapping
 - act as a container for multiple (named) categories

For clarity purposes, I don't think these features should be handled together. The names are not used as a "key" to access the data. They are used as a property associated with each category, which allows to display a meaningful error message (which is a very good thing) when one category is found to contains too few data.

For clarity I prefer to separate these features. On the one hand, tthe Category class I proposed does provide the name/data association in a strongly typed way which is always good. I do like strong typing. In fact I could even have proposed to wrap only the double array in a Category. On the other hand, multiple categories is done by putting the Category instances in some container (a Container implementation, a Category[], whatever).

Accepting both double[] and Category as the container elements and checking this in the argument checking code seems odd to me. It raises object-oriented design concerns. Once we have chosen the type (either double[] or Category), we should stick with it. This would also allow in a future version to use generics with fewer changes on user side when we decide to drop support for 1.3.

There are no deadline, this is a voluntarily driven project. I would of course be very happy to have this soon, since this issue as well as issue MATH-176 are the two last ones we wanted to fix before releasing version 1.2.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558005#action_12558005 ]

Bob MacCallum commented on MATH-173:
------------------------------------

Thanks Luc, I don't think your English was at fault, just my brain!  Using Perl for so long, I tend to use hashes for absolutely everything.

Firstly, you mean Collection (not Container), right?  

So whatever we decide to pass to the methods, the API will look like this:

public abstract double anovaPValue(Collection categorydata)
        throws IllegalArgumentException, MathException;

public abstract double anovaFValue(Collection categorydata)
        throws IllegalArgumentException, MathException;

[offtopic, I guess a boolean anovaTest(Collection categorydata, double alpha) would be useful too.]


The documentation and arg checking will say whether or not we want a collection of double[] or Category.
It will only be truly strongly typed when we use Generics, right?

I am happy to go ahead with Category.  I had a quick look through the rest of commons math to see if there was something like that already (doesn't seem to be) and where it should go (not really sure).  I also tried to think what other stats might use such an entity (and perhaps give it a name that is more suitable for general use).

Are we reinventing DoubleArray?  Could we just create an implementation for that which includes a name?  I personally find the overhead of copying double[]s a bit worrying.

Thanks for all your help with this.


> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560853#action_12560853 ]

Phil Steitz commented on MATH-173:
----------------------------------

Lets make a decision here and get this completed or push it out to 2.0.  Unless someone sees a real need for carrying class / category names along, I propose that we just use Collection (of double[]) with the "of double[]" to be enforced when we move to JDK 1.5 minimum.

To get this in, we need to
1) Decide API issue above
2) Eliminate JDK 1.5 dependencies
3) Complete javadoc (adding description of algorithm and references)
4) Update user guide with a quick blurb on this
5) Update changes.xml to reflect the change

I can help with any / all of these.  If there are no objections to the proposal above for 1) and no new patches/plans in the next couple of days, I will jump in and do this.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560861#action_12560861 ]

Bob MacCallum commented on MATH-173:
------------------------------------

I'm all for this simple solution and I will aim to do 1,2&3 this evening. If someone really wants to go for category names before 1.4 release then it's probably easier to add that to my JDK1.3ified code.

Thanks for the nudge Phil.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560880#action_12560880 ]

Luc Maisonobe commented on MATH-173:
------------------------------------

I agree with the simple Collection of double[] too.

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, AnovaImpl.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bob MacCallum updated MATH-173:
-------------------------------

    Attachment: AnovaTest.java
                AnovaImpl.java
                Anova.java

removed JDK1.5 dependent code, API now requires data passed as Collection of double[]

added boolean anovaTest method

cleaned up documentation as much as I could

> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, Anova.java, AnovaImpl.java, AnovaImpl.java, AnovaTest.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MATH-173) One-way ANOVA

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MATH-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560898#action_12560898 ]

Bob MacCallum commented on MATH-173:
------------------------------------

maybe consider renaming it OneWayANOVA  or OneWayAnova?


> One-way ANOVA
> -------------
>
>                 Key: MATH-173
>                 URL: https://issues.apache.org/jira/browse/MATH-173
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: Nightly Builds
>            Reporter: Bob MacCallum
>             Fix For: 1.2
>
>         Attachments: Anova.java, Anova.java, AnovaImpl.java, AnovaImpl.java, AnovaTest.java, AnovaTest.java
>
>
> Here is some proposed code to add one-way ANOVA tests to commons-math
> I will be attaching
> src/test/org/apache/commons/math/stat/inference/AnovaTest.java
> src/java/org/apache/commons/math/stat/inference/Anova.java
> src/java/org/apache/commons/math/stat/inference/AnovaImpl.java
> I followed TTest as a style guide.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

12