commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pste...@apache.org
Subject svn commit: r1462393 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
Date Fri, 29 Mar 2013 04:26:36 GMT
Author: psteitz
Date: Fri Mar 29 04:26:36 2013
New Revision: 1462393

URL: http://svn.apache.org/r1462393
Log:
Made static fields static.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java?rev=1462393&r1=1462392&r2=1462393&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/fitting/MultivariateNormalMixtureExpectationMaximization.java
Fri Mar 29 04:26:36 2013
@@ -53,6 +53,14 @@ import org.apache.commons.math3.util.Pai
  */
 public class MultivariateNormalMixtureExpectationMaximization {
     /**
+     * Default maximum number of iterations allowed per fitting process.
+     */
+    private static final int DEFAULT_MAX_ITERATIONS = 1000;
+    /**
+     * Default convergence threshold for fitting.
+     */
+    private static final double DEFAULT_THRESHOLD = 1E-5;
+    /**
      * The data to fit.
      */
     private final double[][] data;
@@ -64,14 +72,6 @@ public class MultivariateNormalMixtureEx
      * The log likelihood of the data given the fitted model.
      */
     private double logLikelihood = 0d;
-    /**
-     * Default maximum number of iterations allowed per fitting process.
-     */
-    private final int defaultMaxIterations = 1000;
-    /**
-     * Default convergence threshold for fitting.
-     */
-    private final double defaultThreshold = 1E-5;
 
     /**
      * Creates an object to fit a multivariate normal mixture model to data.
@@ -278,7 +278,7 @@ public class MultivariateNormalMixtureEx
     public void fit(MixtureMultivariateNormalDistribution initialMixture)
         throws SingularMatrixException,
                NotStrictlyPositiveException {
-        fit(initialMixture, defaultMaxIterations, defaultThreshold);
+        fit(initialMixture, DEFAULT_MAX_ITERATIONS, DEFAULT_THRESHOLD);
     }
 
     /**



Mime
View raw message