diff --git a/src/java/org/apache/commons/math/stat/univariate/AbstractDescriptiveStatistics.java b/src/java/org/apache/commons/math/stat/univariate/AbstractDescriptiveStatistics.java index 6eaec08ef..54840fd3f 100644 --- a/src/java/org/apache/commons/math/stat/univariate/AbstractDescriptiveStatistics.java +++ b/src/java/org/apache/commons/math/stat/univariate/AbstractDescriptiveStatistics.java @@ -31,7 +31,7 @@ import org.apache.commons.math.stat.univariate.summary.SumOfSquares; /** * Abstract superclass for DescriptiveStatistics implementations. * - * @version $Revision: 1.2 $ $Date: 2004/05/03 14:32:25 $ + * @version $Revision: 1.3 $ $Date: 2004/05/23 00:56:15 $ */ public abstract class AbstractDescriptiveStatistics extends DescriptiveStatistics { @@ -100,21 +100,6 @@ public abstract class AbstractDescriptiveStatistics return apply(new Kurtosis()); } - /** - * @see org.apache.commons.math.stat.univariate.DescriptiveStatistics#getKurtosisClass() - */ - public int getKurtosisClass() { - int kClass = MESOKURTIC; - - double kurtosis = getKurtosis(); - if (kurtosis > 0) { - kClass = LEPTOKURTIC; - } else if (kurtosis < 0) { - kClass = PLATYKURTIC; - } - return (kClass); - } - /** * @see org.apache.commons.math.stat.univariate.DescriptiveStatistics#getMax() */ diff --git a/src/java/org/apache/commons/math/stat/univariate/DescriptiveStatistics.java b/src/java/org/apache/commons/math/stat/univariate/DescriptiveStatistics.java index 4bbff1a61..c6b8772a0 100644 --- a/src/java/org/apache/commons/math/stat/univariate/DescriptiveStatistics.java +++ b/src/java/org/apache/commons/math/stat/univariate/DescriptiveStatistics.java @@ -23,7 +23,7 @@ import org.apache.commons.discovery.tools.DiscoverClass; /** * Abstract factory class for univariate statistical summaries. * - * @version $Revision: 1.4 $ $Date: 2004/05/19 14:16:31 $ + * @version $Revision: 1.5 $ $Date: 2004/05/23 00:56:15 $ */ public abstract class DescriptiveStatistics implements Serializable, StatisticalSummary { @@ -83,19 +83,6 @@ public abstract class DescriptiveStatistics implements Serializable, Statistical */ public static final int INFINITE_WINDOW = -1; - /** - * A LEPTOKURTIC set has a positive kurtosis (a high peak) - */ - public static int LEPTOKURTIC = 1; - /** - * A MESOKURTIC set has a kurtosis of 0 - it is a normal distribution - */ - public static int MESOKURTIC = 0; - /** - * A PLATYKURTIC set has a negative kurtosis (a flat "peak") - */ - public static int PLATYKURTIC = -1; - /** * Adds the value to the set of numbers * @param v the value to be added @@ -147,17 +134,6 @@ public abstract class DescriptiveStatistics implements Serializable, Statistical */ public abstract double getKurtosis(); - /** - * Returns the Kurtosis "classification" a distribution can be - * leptokurtic (high peak), platykurtic (flat peak), - * or mesokurtic (zero kurtosis). - * - * @return A static constant defined in this interface, - * StoredDeviation.LEPTOKURITC, StoredDeviation.PLATYKURTIC, or - * StoredDeviation.MESOKURTIC - */ - public abstract int getKurtosisClass(); - /** * Returns the maximum of the available values * @return The max or Double.NaN if no values have been added. diff --git a/src/test/org/apache/commons/math/stat/StatUtilsTest.java b/src/test/org/apache/commons/math/stat/StatUtilsTest.java index f4acdc0eb..631c1f3d5 100644 --- a/src/test/org/apache/commons/math/stat/StatUtilsTest.java +++ b/src/test/org/apache/commons/math/stat/StatUtilsTest.java @@ -20,11 +20,10 @@ import junit.framework.TestCase; import junit.framework.TestSuite; import org.apache.commons.math.TestUtils; -import org.apache.commons.math.stat.univariate.DescriptiveStatistics; /** * Test cases for the {@link StatUtils} class. - * @version $Revision: 1.15 $ $Date: 2004/04/27 16:42:31 $ + * @version $Revision: 1.16 $ $Date: 2004/05/23 00:56:15 $ */ public final class StatUtilsTest extends TestCase { @@ -42,7 +41,6 @@ public final class StatUtilsTest extends TestCase { private double max = 3; private double skewness = 0; private double kurtosis = 0.5; - private int kClass = DescriptiveStatistics.LEPTOKURTIC; private double tolerance = 10E-15; public StatUtilsTest(String name) { diff --git a/src/test/org/apache/commons/math/stat/univariate/DescriptiveStatisticsTest.java b/src/test/org/apache/commons/math/stat/univariate/DescriptiveStatisticsTest.java index ec6eb6717..4dcbd0e95 100644 --- a/src/test/org/apache/commons/math/stat/univariate/DescriptiveStatisticsTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/DescriptiveStatisticsTest.java @@ -26,7 +26,7 @@ import org.apache.commons.math.random.RandomDataImpl; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.5 $ $Date: 2004/05/23 00:30:01 $ + * @version $Revision: 1.6 $ $Date: 2004/05/23 00:56:15 $ */ public final class DescriptiveStatisticsTest extends TestCase { @@ -43,7 +43,6 @@ public final class DescriptiveStatisticsTest extends TestCase { private double max = 3; private double skewness = 0; private double kurtosis = 0.5; - private int kClass = DescriptiveStatistics.LEPTOKURTIC; private double tolerance = 10E-15; public DescriptiveStatisticsTest(String name) { @@ -408,30 +407,5 @@ public final class DescriptiveStatisticsTest extends TestCase { assertEquals(3.0, u.getMean(), tolerance); } - public void testKurtosisClass() { - DescriptiveStatistics u = DescriptiveStatistics.newInstance(); - u.setWindowSize(5); - - u.addValue(1.0); - u.addValue(1.0); - u.addValue(2.0); - u.addValue(1.0); - u.addValue(1.0); - assertEquals(DescriptiveStatistics.LEPTOKURTIC, u.getKurtosisClass()); - - u.addValue(1.0); - u.addValue(2.0); - u.addValue(2.0); - u.addValue(2.0); - u.addValue(1.0); - assertEquals(DescriptiveStatistics.PLATYKURTIC, u.getKurtosisClass()); -// -// u.addValue(1.0); -// u.addValue(1.5); -// u.addValue(2.0912994180548905); -// u.addValue(1.5); -// u.addValue(1.0); -// assertEquals(DescriptiveStatistics.MESOKURTIC, u.getKurtosisClass()); - } } diff --git a/src/test/org/apache/commons/math/stat/univariate/ListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/univariate/ListUnivariateImplTest.java index 2de247b71..a5b901999 100644 --- a/src/test/org/apache/commons/math/stat/univariate/ListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/ListUnivariateImplTest.java @@ -25,7 +25,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.1 $ $Date: 2004/04/12 02:27:50 $ + * @version $Revision: 1.2 $ $Date: 2004/05/23 00:56:15 $ */ public final class ListUnivariateImplTest extends TestCase { @@ -43,7 +43,6 @@ public final class ListUnivariateImplTest extends TestCase { private double max = 3; private double skewness = 0; private double kurtosis = 0.5; - private int kClass = DescriptiveStatistics.LEPTOKURTIC; private double tolerance = 10E-15; public ListUnivariateImplTest(String name) { diff --git a/src/test/org/apache/commons/math/stat/univariate/MixedListUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/univariate/MixedListUnivariateImplTest.java index 4a1fd76e3..6ec8d16b3 100644 --- a/src/test/org/apache/commons/math/stat/univariate/MixedListUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/MixedListUnivariateImplTest.java @@ -27,7 +27,7 @@ import junit.framework.TestSuite; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.1 $ $Date: 2004/04/12 02:27:50 $ + * @version $Revision: 1.2 $ $Date: 2004/05/23 00:56:15 $ */ public final class MixedListUnivariateImplTest extends TestCase { @@ -45,7 +45,6 @@ public final class MixedListUnivariateImplTest extends TestCase { private double max = 3; private double skewness = 0; private double kurtosis = 0.5; - private int kClass = DescriptiveStatistics.LEPTOKURTIC; private double tolerance = 10E-15; private TransformerMap transformers = new TransformerMap(); diff --git a/src/test/org/apache/commons/math/stat/univariate/StoreUnivariateImplTest.java b/src/test/org/apache/commons/math/stat/univariate/StoreUnivariateImplTest.java index 1f0319812..434791807 100644 --- a/src/test/org/apache/commons/math/stat/univariate/StoreUnivariateImplTest.java +++ b/src/test/org/apache/commons/math/stat/univariate/StoreUnivariateImplTest.java @@ -25,7 +25,7 @@ import org.apache.commons.math.random.RandomDataImpl; /** * Test cases for the {@link Univariate} class. * - * @version $Revision: 1.1 $ $Date: 2004/04/12 02:27:50 $ + * @version $Revision: 1.2 $ $Date: 2004/05/23 00:56:15 $ */ public final class StoreUnivariateImplTest extends TestCase { @@ -42,7 +42,6 @@ public final class StoreUnivariateImplTest extends TestCase { private double max = 3; private double skewness = 0; private double kurtosis = 0.5; - private int kClass = DescriptiveStatistics.LEPTOKURTIC; private double tolerance = 10E-15; public StoreUnivariateImplTest(String name) {