You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by sr...@apache.org on 2012/06/20 14:07:58 UTC

svn commit: r1352052 [7/7] - in /mahout/trunk: ./ buildtools/ buildtools/src/main/resources/ core/ core/src/main/java/org/apache/mahout/cf/taste/hadoop/ core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/ core/src/main/java/org/apache/mahout/cf/t...

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/EigenDecomposition.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/EigenDecomposition.java?rev=1352052&r1=1352051&r2=1352052&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/EigenDecomposition.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/EigenDecomposition.java Wed Jun 20 12:07:50 2012
@@ -21,7 +21,6 @@
 
 package org.apache.mahout.math.solver;
 
-
 import org.apache.mahout.math.DenseMatrix;
 import org.apache.mahout.math.DenseVector;
 import org.apache.mahout.math.Matrix;
@@ -41,23 +40,15 @@ import org.apache.mahout.math.function.F
  * A.times(V) equals V.times(D).  The matrix V may be badly conditioned, or even singular, so the
  * validity of the equation A = V*D*inverse(V) depends upon V.cond().
  */
-
 public class EigenDecomposition {
-  /**
-   * Row and column dimension (square matrix).
-   */
-  private int n;
-
-  /**
-   * Arrays for internal storage of eigenvalues.
-   */
-  private Vector d;
-  private Vector e;
 
-  /**
-   * Array for internal storage of eigenvectors.
-   */
-  private Matrix v;
+  /** Row and column dimension (square matrix). */
+  private final int n;
+  /** Arrays for internal storage of eigenvalues. */
+  private final Vector d;
+  private final Vector e;
+  /** Array for internal storage of eigenvectors. */
+  private final Matrix v;
 
   public EigenDecomposition(Matrix x) {
     this(x, isSymmetric(x));
@@ -118,7 +109,7 @@ public class EigenDecomposition {
     x.assign(0);
     x.viewDiagonal().assign(d);
     for (int i = 0; i < n; i++) {
-      final double v = e.getQuick(i);
+      double v = e.getQuick(i);
       if (v > 0) {
         x.setQuick(i, i + 1, v);
       } else if (v < 0) {
@@ -168,7 +159,7 @@ public class EigenDecomposition {
           g = -g;
         }
         e.setQuick(i, scale * g);
-        h = h - f * g;
+        h -= f * g;
         d.setQuick(i - 1, f - g);
         for (int j = 0; j < i; j++) {
           e.setQuick(j, 0.0);
@@ -271,7 +262,7 @@ public class EigenDecomposition {
       if (m > l) {
         int iter = 0;
         do {
-          iter = iter + 1;  // (Could check iteration count here.)
+          iter++;  // (Could check iteration count here.)
 
           // Compute implicit shift
 
@@ -288,7 +279,7 @@ public class EigenDecomposition {
           for (int i = l + 2; i < n; i++) {
             d.setQuick(i, d.getQuick(i) - h);
           }
-          f = f + h;
+          f += h;
 
           // Implicit QL transformation.
 
@@ -373,7 +364,7 @@ public class EigenDecomposition {
 
       // Scale column.
 
-      final Vector hColumn = hessenBerg.viewColumn(m - 1).viewPart(m, high - m + 1);
+      Vector hColumn = hessenBerg.viewColumn(m - 1).viewPart(m, high - m + 1);
       double scale = hColumn.norm(1);
 
       if (scale != 0.0) {
@@ -386,7 +377,7 @@ public class EigenDecomposition {
         if (ort.getQuick(m) > 0) {
           g = -g;
         }
-        h = h - ort.getQuick(m) * g;
+        h -= ort.getQuick(m) * g;
         ort.setQuick(m, ort.getQuick(m) - g);
 
         // Apply Householder similarity transformation
@@ -418,7 +409,7 @@ public class EigenDecomposition {
         for (int j = m; j <= high; j++) {
           double g = ort.viewPart(m, high - m + 1).dot(v.viewColumn(j).viewPart(m, high - m + 1));
           // Double division avoids possible underflow
-          g = (g / ort.getQuick(m)) / hessenBerg.getQuick(m, m - 1);
+          g = g / ort.getQuick(m) / hessenBerg.getQuick(m, m - 1);
           v.viewColumn(j).viewPart(m, high - m + 1).assign(ort.viewPart(m, high - m + 1), Functions.plusMult(g));
         }
       }
@@ -428,8 +419,8 @@ public class EigenDecomposition {
 
 
   // Complex scalar division.
-  private transient double cdivr;
-  private transient double cdivi;
+  private double cdivr;
+  private double cdivi;
 
   private void cdiv(double xr, double xi, double yr, double yi) {
     double r;
@@ -459,13 +450,20 @@ public class EigenDecomposition {
 
     // Initialize
 
-    final int nn = this.n;
+    int nn = this.n;
     int n = nn - 1;
-    final int low = 0;
-    final int high = nn - 1;
+    int low = 0;
+    int high = nn - 1;
     double eps = Math.pow(2.0, -52.0);
     double exshift = 0.0;
-    double p = 0, q = 0, r = 0, s = 0, z = 0, t, w, x, y;
+    double p = 0;
+    double q = 0;
+    double r = 0;
+    double s = 0;
+    double z = 0;
+    double w;
+    double x;
+    double y;
 
     // Store roots isolated by balanc and compute matrix norm
 
@@ -530,8 +528,8 @@ public class EigenDecomposition {
           p = x / s;
           q = z / s;
           r = Math.sqrt(p * p + q * q);
-          p = p / r;
-          q = q / r;
+          p /= r;
+          q /= r;
 
           // Row modification
 
@@ -565,7 +563,7 @@ public class EigenDecomposition {
           e.setQuick(n - 1, z);
           e.setQuick(n, -z);
         }
-        n = n - 2;
+        n -= 2;
         iter = 0;
 
         // No convergence yet
@@ -613,7 +611,7 @@ public class EigenDecomposition {
           }
         }
 
-        iter = iter + 1;   // (Could check iteration count here.)
+        iter++;   // (Could check iteration count here.)
 
         // Look for two consecutive small sub-diagonal elements
 
@@ -626,14 +624,14 @@ public class EigenDecomposition {
           q = h.getQuick(m + 1, m + 1) - z - r - s;
           r = h.getQuick(m + 2, m + 1);
           s = Math.abs(p) + Math.abs(q) + Math.abs(r);
-          p = p / s;
-          q = q / s;
-          r = r / s;
+          p /= s;
+          q /= s;
+          r /= s;
           if (m == l) {
             break;
           }
-          final double hmag = Math.abs(h.getQuick(m - 1, m - 1)) + Math.abs(h.getQuick(m + 1, m + 1));
-          final double threshold = eps * Math.abs(p) * (Math.abs(z) + hmag);
+          double hmag = Math.abs(h.getQuick(m - 1, m - 1)) + Math.abs(h.getQuick(m + 1, m + 1));
+          double threshold = eps * Math.abs(p) * (Math.abs(z) + hmag);
           if (Math.abs(h.getQuick(m, m - 1)) * (Math.abs(q) + Math.abs(r)) < threshold) {
             break;
           }
@@ -657,9 +655,9 @@ public class EigenDecomposition {
             r = notlast ? h.getQuick(k + 2, k - 1) : 0.0;
             x = Math.abs(p) + Math.abs(q) + Math.abs(r);
             if (x != 0.0) {
-              p = p / x;
-              q = q / x;
-              r = r / x;
+              p /= x;
+              q /= x;
+              r /= x;
             }
           }
           if (x == 0.0) {
@@ -675,19 +673,19 @@ public class EigenDecomposition {
             } else if (l != m) {
               h.setQuick(k, k - 1, -h.getQuick(k, k - 1));
             }
-            p = p + s;
+            p += s;
             x = p / s;
             y = q / s;
             z = r / s;
-            q = q / p;
-            r = r / p;
+            q /= p;
+            r /= p;
 
             // Row modification
 
             for (int j = k; j < nn; j++) {
               p = h.getQuick(k, j) + q * h.getQuick(k + 1, j);
               if (notlast) {
-                p = p + r * h.getQuick(k + 2, j);
+                p += r * h.getQuick(k + 2, j);
                 h.setQuick(k + 2, j, h.getQuick(k + 2, j) - p * z);
               }
               h.setQuick(k, j, h.getQuick(k, j) - p * x);
@@ -699,7 +697,7 @@ public class EigenDecomposition {
             for (int i = 0; i <= Math.min(n, k + 3); i++) {
               p = x * h.getQuick(i, k) + y * h.getQuick(i, k + 1);
               if (notlast) {
-                p = p + z * h.getQuick(i, k + 2);
+                p += z * h.getQuick(i, k + 2);
                 h.setQuick(i, k + 2, h.getQuick(i, k + 2) - p * r);
               }
               h.setQuick(i, k, h.getQuick(i, k) - p);
@@ -711,7 +709,7 @@ public class EigenDecomposition {
             for (int i = low; i <= high; i++) {
               p = x * v.getQuick(i, k) + y * v.getQuick(i, k + 1);
               if (notlast) {
-                p = p + z * v.getQuick(i, k + 2);
+                p += z * v.getQuick(i, k + 2);
                 v.setQuick(i, k + 2, v.getQuick(i, k + 2) - p * r);
               }
               v.setQuick(i, k, v.getQuick(i, k) - p);
@@ -734,6 +732,7 @@ public class EigenDecomposition {
 
       // Real vector
 
+      double t;
       if (q == 0) {
         int l = n;
         h.setQuick(n, n, 1.0);
@@ -741,7 +740,7 @@ public class EigenDecomposition {
           w = h.getQuick(i, i) - p;
           r = 0.0;
           for (int j = l; j <= n; j++) {
-            r = r + h.getQuick(i, j) * h.getQuick(j, n);
+            r += h.getQuick(i, j) * h.getQuick(j, n);
           }
           if (e.getQuick(i) < 0.0) {
             z = w;
@@ -749,10 +748,10 @@ public class EigenDecomposition {
           } else {
             l = i;
             if (e.getQuick(i) == 0.0) {
-              if (w != 0.0) {
-                h.setQuick(i, n, -r / w);
-              } else {
+              if (w == 0.0) {
                 h.setQuick(i, n, -r / (eps * norm));
+              } else {
+                h.setQuick(i, n, -r / w);
               }
 
               // Solve real equations
@@ -773,7 +772,7 @@ public class EigenDecomposition {
             // Overflow control
 
             t = Math.abs(h.getQuick(i, n));
-            if ((eps * t) * t > 1) {
+            if (eps * t * t > 1) {
               for (int j = i; j <= n; j++) {
                 h.setQuick(j, n, h.getQuick(j, n) / t);
               }
@@ -799,12 +798,11 @@ public class EigenDecomposition {
         h.setQuick(n, n - 1, 0.0);
         h.setQuick(n, n, 1.0);
         for (int i = n - 2; i >= 0; i--) {
-          double ra, sa, vr, vi;
-          ra = 0.0;
-          sa = 0.0;
+          double ra = 0.0;
+          double sa = 0.0;
           for (int j = l; j <= n; j++) {
-            ra = ra + h.getQuick(i, j) * h.getQuick(j, n - 1);
-            sa = sa + h.getQuick(i, j) * h.getQuick(j, n);
+            ra += h.getQuick(i, j) * h.getQuick(j, n - 1);
+            sa += h.getQuick(i, j) * h.getQuick(j, n);
           }
           w = h.getQuick(i, i) - p;
 
@@ -824,10 +822,10 @@ public class EigenDecomposition {
 
               x = h.getQuick(i, i + 1);
               y = h.getQuick(i + 1, i);
-              vr = (d.getQuick(i) - p) * (d.getQuick(i) - p) + e.getQuick(i) * e.getQuick(i) - q * q;
-              vi = (d.getQuick(i) - p) * 2.0 * q;
-              if (vr == 0.0 & vi == 0.0) {
-                final double hmag = Math.abs(x) + Math.abs(y);
+              double vr = (d.getQuick(i) - p) * (d.getQuick(i) - p) + e.getQuick(i) * e.getQuick(i) - q * q;
+              double vi = (d.getQuick(i) - p) * 2.0 * q;
+              if (vr == 0.0 && vi == 0.0) {
+                double hmag = Math.abs(x) + Math.abs(y);
                 vr = eps * norm * (Math.abs(w) + Math.abs(q) + hmag + Math.abs(z));
               }
               cdiv(x * r - z * ra + q * sa, x * s - z * sa - q * ra, vr, vi);
@@ -846,7 +844,7 @@ public class EigenDecomposition {
             // Overflow control
 
             t = Math.max(Math.abs(h.getQuick(i, n - 1)), Math.abs(h.getQuick(i, n)));
-            if ((eps * t) * t > 1) {
+            if (eps * t * t > 1) {
               for (int j = i; j <= n; j++) {
                 h.setQuick(j, n - 1, h.getQuick(j, n - 1) / t);
                 h.setQuick(j, n, h.getQuick(j, n) / t);
@@ -873,7 +871,7 @@ public class EigenDecomposition {
       for (int i = low; i <= high; i++) {
         z = 0.0;
         for (int k = low; k <= Math.min(j, high); k++) {
-          z = z + v.getQuick(i, k) * h.getQuick(k, j);
+          z += v.getQuick(i, k) * h.getQuick(k, j);
         }
         v.setQuick(i, j, z);
       }
@@ -887,8 +885,8 @@ public class EigenDecomposition {
     int n = a.columnSize();
 
     boolean isSymmetric = true;
-    for (int j = 0; (j < n) & isSymmetric; j++) {
-      for (int i = 0; (i < n) & isSymmetric; i++) {
+    for (int j = 0; (j < n) && isSymmetric; j++) {
+      for (int i = 0; (i < n) && isSymmetric; i++) {
         isSymmetric = a.getQuick(i, j) == a.getQuick(j, i);
       }
     }

Modified: mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/LSMR.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/LSMR.java?rev=1352052&r1=1352051&r2=1352052&view=diff
==============================================================================
--- mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/LSMR.java (original)
+++ mahout/trunk/math/src/main/java/org/apache/mahout/math/solver/LSMR.java Wed Jun 20 12:07:50 2012
@@ -561,10 +561,6 @@ public class LSMR {
     this.localSize = localSize;
   }
 
-  private void setLambda(double lambda) {
-    this.lambda = lambda;
-  }
-
   public double getLambda() {
     return lambda;
   }

Modified: mahout/trunk/math/src/test/java/org/apache/mahout/math/TestMatrixView.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/test/java/org/apache/mahout/math/TestMatrixView.java?rev=1352052&r1=1352051&r2=1352052&view=diff
==============================================================================
--- mahout/trunk/math/src/test/java/org/apache/mahout/math/TestMatrixView.java (original)
+++ mahout/trunk/math/src/test/java/org/apache/mahout/math/TestMatrixView.java Wed Jun 20 12:07:50 2012
@@ -26,9 +26,6 @@ import java.util.Map;
 
 public final class TestMatrixView extends MahoutTestCase {
 
-  private static final int ROW = AbstractMatrix.ROW;
-  private static final int COL = AbstractMatrix.COL;
-
   private final double[][] values = {{0.0, 1.1, 2.2}, {1.1, 2.2, 3.3},
     {3.3, 4.4, 5.5}, {5.5, 6.6, 7.7}, {7.7, 8.8, 9.9}};
 

Modified: mahout/trunk/math/src/test/java/org/apache/mahout/math/als/AlternatingLeastSquaresSolverTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/test/java/org/apache/mahout/math/als/AlternatingLeastSquaresSolverTest.java?rev=1352052&r1=1352051&r2=1352052&view=diff
==============================================================================
--- mahout/trunk/math/src/test/java/org/apache/mahout/math/als/AlternatingLeastSquaresSolverTest.java (original)
+++ mahout/trunk/math/src/test/java/org/apache/mahout/math/als/AlternatingLeastSquaresSolverTest.java Wed Jun 20 12:07:50 2012
@@ -24,29 +24,19 @@ import org.apache.mahout.math.RandomAcce
 import org.apache.mahout.math.SequentialAccessSparseVector;
 import org.apache.mahout.math.SparseMatrix;
 import org.apache.mahout.math.Vector;
-import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Arrays;
 
 public class AlternatingLeastSquaresSolverTest extends MahoutTestCase {
 
-  private AlternatingLeastSquaresSolver solver;
-
-  @Override
-  @Before
-  public void setUp() throws Exception {
-    super.setUp();
-    solver = new AlternatingLeastSquaresSolver();
-  }
-
   @Test
   public void addLambdaTimesNuiTimesE() {
     int nui = 5;
     double lambda = 0.2;
     Matrix matrix = new SparseMatrix(5, 5);
 
-    solver.addLambdaTimesNuiTimesE(matrix, lambda, nui);
+    AlternatingLeastSquaresSolver.addLambdaTimesNuiTimesE(matrix, lambda, nui);
 
     for (int n = 0; n < 5; n++) {
       assertEquals(1.0, matrix.getQuick(n, n), EPSILON);
@@ -58,7 +48,7 @@ public class AlternatingLeastSquaresSolv
     Vector f1 = new DenseVector(new double[] { 1, 2, 3 });
     Vector f2 = new DenseVector(new double[] { 4, 5, 6 });
 
-    Matrix miIi = solver.createMiIi(Arrays.asList(f1, f2), 3);
+    Matrix miIi = AlternatingLeastSquaresSolver.createMiIi(Arrays.asList(f1, f2), 3);
 
     assertEquals(1.0, miIi.getQuick(0, 0), EPSILON);
     assertEquals(2.0, miIi.getQuick(1, 0), EPSILON);
@@ -75,7 +65,7 @@ public class AlternatingLeastSquaresSolv
     ratings.setQuick(3, 3.0);
     ratings.setQuick(5, 5.0);
 
-    Matrix riIiMaybeTransposed = solver.createRiIiMaybeTransposed(ratings);
+    Matrix riIiMaybeTransposed = AlternatingLeastSquaresSolver.createRiIiMaybeTransposed(ratings);
     assertEquals(1, riIiMaybeTransposed.numCols(), 1);
     assertEquals(3, riIiMaybeTransposed.numRows(), 3);
 
@@ -92,7 +82,7 @@ public class AlternatingLeastSquaresSolv
     ratings.setQuick(5, 5.0);
 
     try {
-      solver.createRiIiMaybeTransposed(ratings);
+      AlternatingLeastSquaresSolver.createRiIiMaybeTransposed(ratings);
       fail();
     } catch (IllegalArgumentException e) {}
   }

Modified: mahout/trunk/math/src/test/java/org/apache/mahout/math/solver/EigenDecompositionTest.java
URL: http://svn.apache.org/viewvc/mahout/trunk/math/src/test/java/org/apache/mahout/math/solver/EigenDecompositionTest.java?rev=1352052&r1=1352051&r2=1352052&view=diff
==============================================================================
--- mahout/trunk/math/src/test/java/org/apache/mahout/math/solver/EigenDecompositionTest.java (original)
+++ mahout/trunk/math/src/test/java/org/apache/mahout/math/solver/EigenDecompositionTest.java Wed Jun 20 12:07:50 2012
@@ -24,16 +24,15 @@ import org.apache.mahout.math.MatrixSlic
 import org.apache.mahout.math.Vector;
 import org.apache.mahout.math.function.DoubleFunction;
 import org.apache.mahout.math.function.Functions;
+import org.junit.Assert;
 import org.junit.Test;
 
 import java.util.Random;
 
-import static org.junit.Assert.assertEquals;
-
 public class EigenDecompositionTest {
   @Test
   public void testDegenerateMatrix() {
-    double[][] m = new double[][]{
+    double[][] m = {
       new double[]{0.641284, 0.767303, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000},
       new double[]{0.767303, 3.050159, 2.561342, 0.000000, 0.000000, 0.000000, 0.000000},
       new double[]{0.000000, 2.561342, 5.000609, 0.810507, 0.000000, 0.000000, 0.000000},
@@ -51,8 +50,7 @@ public class EigenDecompositionTest {
   @Test
   public void testDeficientRank() {
     Matrix a = new DenseMatrix(10, 3).assign(new DoubleFunction() {
-      Random gen = RandomUtils.getRandom();
-
+      private final Random gen = RandomUtils.getRandom();
       @Override
       public double apply(double arg1) {
         return gen.nextGaussian();
@@ -66,17 +64,17 @@ public class EigenDecompositionTest {
     Matrix v = eig.getV();
     check("EigenvalueDecomposition (rank deficient)...", a.times(v), v.times(d));
 
-    assertEquals(0, eig.getImagEigenvalues().norm(1), 1e-10);
-    assertEquals(3, eig.getRealEigenvalues().norm(0), 1e-10);
+    Assert.assertEquals(0, eig.getImagEigenvalues().norm(1), 1.0e-10);
+    Assert.assertEquals(3, eig.getRealEigenvalues().norm(0), 1.0e-10);
   }
 
   @Test
   public void testEigen() {
     double[] evals =
-      {0., 1., 0., 0.,
-        1., 0., 2.e-7, 0.,
-        0., -2.e-7, 0., 1.,
-        0., 0., 1., 0.};
+      {0.0, 1.0, 0.0, 0.0,
+          1.0, 0.0, 2.0e-7, 0.0,
+          0.0, -2.0e-7, 0.0, 1.0,
+          0.0, 0.0, 1.0, 0.0};
     int i = 0;
     Matrix a = new DenseMatrix(4, 4);
     for (MatrixSlice row : a) {
@@ -94,7 +92,7 @@ public class EigenDecompositionTest {
   public void testSequential() {
     int validld = 3;
     Matrix A = new DenseMatrix(validld, validld);
-    double[] columnwise = {1., 2., 3., 4., 5., 6., 7., 8., 9., 10., 11., 12.};
+    double[] columnwise = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0};
     int i = 0;
     for (MatrixSlice row : A) {
       for (Vector.Element element : row.vector()) {
@@ -115,8 +113,8 @@ public class EigenDecompositionTest {
 
   }
 
-  private void check(String msg, Matrix a, Matrix b) {
-    assertEquals(msg, 0, a.minus(b).aggregate(Functions.PLUS, Functions.ABS), 1e-10);
+  private static void check(String msg, Matrix a, Matrix b) {
+    Assert.assertEquals(msg, 0, a.minus(b).aggregate(Functions.PLUS, Functions.ABS), 1.0e-10);
   }
 
 }

Modified: mahout/trunk/pom.xml
URL: http://svn.apache.org/viewvc/mahout/trunk/pom.xml?rev=1352052&r1=1352051&r2=1352052&view=diff
==============================================================================
--- mahout/trunk/pom.xml (original)
+++ mahout/trunk/pom.xml Wed Jun 20 12:07:50 2012
@@ -178,13 +178,13 @@
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
-        <version>4.8.2</version>
+        <version>4.10</version>
         <scope>test</scope>
       </dependency>
       <dependency>
         <groupId>org.easymock</groupId>
         <artifactId>easymock</artifactId>
-        <version>3.0</version>
+        <version>3.1</version>
         <scope>test</scope>
       </dependency>
 
@@ -356,12 +356,12 @@
       <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-core-asl</artifactId>
-        <version>1.8.2</version>
+        <version>1.8.8</version>
       </dependency>
       <dependency>
         <groupId>org.codehaus.jackson</groupId>
         <artifactId>jackson-mapper-asl</artifactId>
-        <version>1.8.2</version>
+        <version>1.8.8</version>
       </dependency>
 
       <dependency>
@@ -373,18 +373,18 @@
       <dependency>
         <groupId>commons-pool</groupId>
         <artifactId>commons-pool</artifactId>
-        <version>1.5.6</version>
+        <version>1.6</version>
       </dependency>
 
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
-        <version>1.6.1</version>
+        <version>1.6.6</version>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-jcl</artifactId>
-        <version>1.6.1</version>
+        <version>1.6.6</version>
         <scope>test</scope>
       </dependency>
       
@@ -415,13 +415,13 @@
       <dependency>
         <groupId>com.thoughtworks.xstream</groupId>
         <artifactId>xstream</artifactId>
-        <version>1.3.1</version>
+        <version>1.4.2</version>
       </dependency>
 
       <dependency>
         <groupId>com.google.guava</groupId>
         <artifactId>guava</artifactId>
-        <version>r09</version>
+        <version>12.0</version>
       </dependency>
       
       <dependency>
@@ -459,22 +459,22 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-javadoc-plugin</artifactId>
-          <version>2.8</version>
+          <version>2.8.1</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-antrun-plugin</artifactId>
-          <version>1.6</version>
+          <version>1.7</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-assembly-plugin</artifactId>
-          <version>2.2</version>
+          <version>2.3</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>2.3.1</version>
+          <version>2.4</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -484,12 +484,12 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-resources-plugin</artifactId>
-          <version>2.4.3</version>
+          <version>2.5</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-eclipse-plugin</artifactId>
-          <version>2.8</version>
+          <version>2.9</version>
           <configuration>
             <outputDirectory>${eclipse.outputDirectory}</outputDirectory>
             <buildcommands>
@@ -529,7 +529,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
-          <version>2.1</version>
+          <version>2.3.1</version>
           <configuration>
             <useReleaseProfile>true</useReleaseProfile>
             <releaseProfiles>release,mahout_release</releaseProfiles>
@@ -542,7 +542,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>2.3.2</version>
+          <version>2.4</version>
           <configuration>
             <encoding>UTF-8</encoding>
             <source>1.6</source>
@@ -553,7 +553,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-checkstyle-plugin</artifactId>
-          <version>2.6</version>
+          <version>2.9.1</version>
           <dependencies>
             <dependency>
               <groupId>org.apache.mahout</groupId>
@@ -586,7 +586,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-pmd-plugin</artifactId>
-          <version>2.5</version>
+          <version>2.7.1</version>
           <dependencies>
             <dependency>
               <groupId>org.apache.mahout</groupId>
@@ -620,12 +620,12 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.8.1</version>
+          <version>2.12</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-remote-resources-plugin</artifactId>
-          <version>1.1</version>
+          <version>1.3</version>
           <configuration>
             <skipTests>${skipTests}</skipTests>
             <appendedResourcesDirectory>./src/main/appended-resources</appendedResourcesDirectory>
@@ -666,15 +666,14 @@
       <plugin>
         <groupId>com.atlassian.maven.plugins</groupId>
         <artifactId>maven-clover2-plugin</artifactId>
-        <version>2.6.3</version>
+        <version>3.1.4</version>
       </plugin>
     </plugins>
-
       <resources>
-          <resource>
-              <directory>src/main/resources</directory>
-              <filtering>true</filtering>
-          </resource>
+        <resource>
+          <directory>src/main/resources</directory>
+          <filtering>true</filtering>
+        </resource>
       </resources>
   </build>
   <modules>
@@ -723,6 +722,7 @@
             <inherited>true</inherited>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-source-plugin</artifactId>
+            <version>2.1.2</version>
             <executions>
               <execution>
                 <id>attach-sources</id>
@@ -736,6 +736,7 @@
             <inherited>true</inherited>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-javadoc-plugin</artifactId>
+            <version>2.8.1</version>
             <executions>
               <execution>
                 <id>attach-javadocs</id>
@@ -749,7 +750,7 @@
             <inherited>true</inherited>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-gpg-plugin</artifactId>
-            <version>1.1</version>
+            <version>1.4</version>
             <executions>
               <execution>
                 <goals>
@@ -768,6 +769,7 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-compiler-plugin</artifactId>
+            <version>2.4</version>
             <configuration>
               <showDeprecation>true</showDeprecation>
               <showWarnings>true</showWarnings>
@@ -777,10 +779,12 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-checkstyle-plugin</artifactId>
+            <version>2.9.1</version>
           </plugin>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-pmd-plugin</artifactId>
+            <version>2.7.1</version>
           </plugin>
         </plugins>
       </build>
@@ -799,7 +803,7 @@
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-eclipse-plugin</artifactId>
-            <version>2.8</version>
+            <version>2.9</version>
             <executions>
               <execution>
                 <id>setup.eclipse.project</id>
@@ -831,13 +835,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>2.8.1</version>
+        <version>2.12</version>
       </plugin>
       <!-- checkstyle -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.6</version>
+        <version>2.9.1</version>
         <configuration>
           <configLocation>${project.build.directory}/../../buildtools/src/main/resources/mahout-checkstyle.xml</configLocation>
           <consoleOutput>true</consoleOutput>
@@ -847,7 +851,7 @@
       <plugin>
         <groupId>com.atlassian.maven.plugins</groupId>
         <artifactId>maven-clover2-plugin</artifactId>
-        <version>2.6.3</version>
+        <version>3.1.4</version>
         <configuration>
           <generateHistorical>true</generateHistorical>
           <licenseLocation>buildtools/clover.license</licenseLocation>
@@ -860,13 +864,13 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.7</version>
+        <version>2.8.1</version>
       </plugin>
       <!-- code duplication - copy and paste detection -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-pmd-plugin</artifactId>
-        <version>2.5</version>
+        <version>2.7.1</version>
         <configuration>
           <rulesets>
             <ruleset>../buildtools/src/main/resources/mahout-pmd-ruleset.xml</ruleset>
@@ -894,7 +898,7 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>findbugs-maven-plugin</artifactId>
-        <version>2.3.1</version>
+        <version>2.5</version>
         <configuration>
           <xmlOutput>true</xmlOutput>
           <xmlOutputDirectory>target/findbugs</xmlOutputDirectory>
@@ -911,7 +915,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-changes-plugin</artifactId>
-        <version>2.4</version>
+        <version>2.7.1</version>
         <configuration>
           <onlyCurrentVersion>true</onlyCurrentVersion>
           <columnNames>Type,Key,Summary,Status,Resolution,Assignee</columnNames>
@@ -928,17 +932,17 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-report-plugin</artifactId>
-        <version>2.6</version>
+        <version>2.12</version>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-javadoc-plugin</artifactId>
-        <version>2.8</version>
+        <version>2.8.1</version>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-project-info-reports-plugin</artifactId>
-        <version>2.3.1</version>
+        <version>2.4</version>
         <reportSets>
           <reportSet>
             <reports>
@@ -953,7 +957,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-pmd-plugin</artifactId>
-        <version>2.5</version>
+        <version>2.7.1</version>
       </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>