hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From millec...@apache.org
Subject svn commit: r1537427 [3/3] - in /hama/trunk: ./ commons/ commons/src/ commons/src/main/ commons/src/main/java/ commons/src/main/java/org/ commons/src/main/java/org/apache/ commons/src/main/java/org/apache/hama/ commons/src/main/java/org/apache/hama/com...
Date Thu, 31 Oct 2013 10:32:41 GMT
Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/AutoEncoder.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/AutoEncoder.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/AutoEncoder.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/AutoEncoder.java Thu Oct 31 10:32:38
2013
@@ -21,12 +21,12 @@ package org.apache.hama.ml.ann;
 import java.util.Map;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleFunction;
+import org.apache.hama.commons.math.DoubleMatrix;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.apache.hama.ml.ann.AbstractLayeredNeuralNetwork.LearningStyle;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleFunction;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
 
 import com.google.common.base.Preconditions;
 

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/NeuralNetworkTrainer.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/NeuralNetworkTrainer.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/NeuralNetworkTrainer.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/NeuralNetworkTrainer.java Thu Oct 31
10:32:38 2013
@@ -27,8 +27,8 @@ import org.apache.hadoop.io.NullWritable
 import org.apache.hama.bsp.BSP;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.sync.SyncException;
+import org.apache.hama.commons.io.VectorWritable;
 import org.apache.hama.ml.perception.MLPMessage;
-import org.apache.hama.ml.writable.VectorWritable;
 
 /**
  * The trainer that is used to train the {@link SmallLayeredNeuralNetwork} with

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetwork.java Thu
Oct 31 10:32:38 2013
@@ -32,14 +32,14 @@ import org.apache.hadoop.io.NullWritable
 import org.apache.hadoop.io.WritableUtils;
 import org.apache.hama.HamaConfiguration;
 import org.apache.hama.bsp.BSPJob;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleFunction;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
-import org.apache.hama.ml.writable.MatrixWritable;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.MatrixWritable;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleFunction;
+import org.apache.hama.commons.math.DoubleMatrix;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.mortbay.log.Log;
 
 import com.google.common.base.Preconditions;

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkMessage.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkMessage.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkMessage.java
(original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkMessage.java
Thu Oct 31 10:32:38 2013
@@ -22,9 +22,9 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.hadoop.io.Writable;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.writable.MatrixWritable;
+import org.apache.hama.commons.io.MatrixWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DoubleMatrix;
 
 /**
  * NeuralNetworkMessage transmits the messages between peers during the training

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkTrainer.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkTrainer.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkTrainer.java
(original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/ann/SmallLayeredNeuralNetworkTrainer.java
Thu Oct 31 10:32:38 2013
@@ -25,10 +25,10 @@ import org.apache.hadoop.io.NullWritable
 import org.apache.hama.bsp.BSP;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.sync.SyncException;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DoubleMatrix;
+import org.apache.hama.commons.math.DoubleVector;
 import org.mortbay.log.Log;
 
 /**

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/CosineDistance.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/CosineDistance.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/CosineDistance.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/CosineDistance.java Thu Oct 31
10:32:38 2013
@@ -17,7 +17,7 @@
  */
 package org.apache.hama.ml.distance;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 public final class CosineDistance implements DistanceMeasurer {
 

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/DistanceMeasurer.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/DistanceMeasurer.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/DistanceMeasurer.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/DistanceMeasurer.java Thu Oct
31 10:32:38 2013
@@ -17,7 +17,7 @@
  */
 package org.apache.hama.ml.distance;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * a {@link DistanceMeasurer} is responsible for calculating the distance

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/EuclidianDistance.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/EuclidianDistance.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/EuclidianDistance.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/distance/EuclidianDistance.java Thu Oct
31 10:32:38 2013
@@ -17,7 +17,7 @@
  */
 package org.apache.hama.ml.distance;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 public final class EuclidianDistance implements DistanceMeasurer {
 

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/CenterMessage.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/CenterMessage.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/CenterMessage.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/CenterMessage.java Thu Oct 31 10:32:38
2013
@@ -22,8 +22,8 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.hadoop.io.Writable;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DoubleVector;
 
 public final class CenterMessage implements Writable {
 

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/KMeansBSP.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/KMeansBSP.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/KMeansBSP.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/kmeans/KMeansBSP.java Thu Oct 31 10:32:38
2013
@@ -40,11 +40,11 @@ import org.apache.hama.bsp.BSP;
 import org.apache.hama.bsp.BSPJob;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.sync.SyncException;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 import org.apache.hama.ml.distance.DistanceMeasurer;
 import org.apache.hama.ml.distance.EuclidianDistance;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
 import org.apache.hama.util.ReflectionUtils;
 
 import com.google.common.base.Preconditions;

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/MultiLayerPerceptron.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/MultiLayerPerceptron.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/MultiLayerPerceptron.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/MultiLayerPerceptron.java Thu
Oct 31 10:32:38 2013
@@ -21,11 +21,11 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.hama.commons.math.DoubleDoubleFunction;
+import org.apache.hama.commons.math.DoubleFunction;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.apache.hama.ml.ann.NeuralNetworkTrainer;
-import org.apache.hama.ml.math.DoubleDoubleFunction;
-import org.apache.hama.ml.math.DoubleFunction;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
 
 /**
  * PerceptronBase defines the common behavior of all the concrete perceptrons.

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/PerceptronTrainer.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/PerceptronTrainer.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/PerceptronTrainer.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/PerceptronTrainer.java Thu Oct
31 10:32:38 2013
@@ -25,7 +25,7 @@ import org.apache.hadoop.io.NullWritable
 import org.apache.hama.bsp.BSP;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.sync.SyncException;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.VectorWritable;
 
 /**
  * The trainer that is used to train the perceptron with BSP. The trainer would

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPMessage.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPMessage.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPMessage.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPMessage.java Thu Oct
31 10:32:38 2013
@@ -21,8 +21,8 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.writable.MatrixWritable;
+import org.apache.hama.commons.io.MatrixWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
 
 /**
  * SmallMLPMessage is used to exchange information for the

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPTrainer.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPTrainer.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPTrainer.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMLPTrainer.java Thu Oct
31 10:32:38 2013
@@ -25,9 +25,9 @@ import org.apache.hadoop.io.LongWritable
 import org.apache.hadoop.io.NullWritable;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.sync.SyncException;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
 import org.apache.hama.ml.ann.NeuralNetworkTrainer;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.writable.VectorWritable;
 
 /**
  * The perceptron trainer for small scale MLP.

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMultiLayerPerceptron.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMultiLayerPerceptron.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMultiLayerPerceptron.java
(original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/perception/SmallMultiLayerPerceptron.java
Thu Oct 31 10:32:38 2013
@@ -39,13 +39,13 @@ import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableUtils;
 import org.apache.hama.HamaConfiguration;
 import org.apache.hama.bsp.BSPJob;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleFunction;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
-import org.apache.hama.ml.writable.MatrixWritable;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.MatrixWritable;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleFunction;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.mortbay.log.Log;
 
 /**

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/CostFunction.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/CostFunction.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/CostFunction.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/CostFunction.java Thu Oct 31
10:32:38 2013
@@ -19,7 +19,7 @@ package org.apache.hama.ml.regression;
 
 import java.math.BigDecimal;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * An optimization (minimization) problem's cost function

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/GradientDescentBSP.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/GradientDescentBSP.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/GradientDescentBSP.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/GradientDescentBSP.java Thu
Oct 31 10:32:38 2013
@@ -25,10 +25,10 @@ import org.apache.hadoop.io.DoubleWritab
 import org.apache.hama.bsp.BSP;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.sync.SyncException;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
-import org.apache.hama.util.KeyValuePair;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.util.KeyValuePair;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/HypothesisFunction.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/HypothesisFunction.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/HypothesisFunction.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/HypothesisFunction.java Thu
Oct 31 10:32:38 2013
@@ -19,7 +19,7 @@ package org.apache.hama.ml.regression;
 
 import java.math.BigDecimal;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * The mathematical model chosen for a specific learning problem

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegression.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegression.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegression.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegression.java Thu Oct
31 10:32:38 2013
@@ -22,10 +22,10 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.hama.commons.math.DoubleMatrix;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.apache.hama.ml.ann.SmallLayeredNeuralNetwork;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
 
 /**
  * Linear regression model. It can be used for numeric regression or prediction.

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegressionModel.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegressionModel.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegressionModel.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LinearRegressionModel.java Thu
Oct 31 10:32:38 2013
@@ -19,7 +19,7 @@ package org.apache.hama.ml.regression;
 
 import java.math.BigDecimal;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * A {@link RegressionModel} for linear regression

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegression.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegression.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegression.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegression.java Thu
Oct 31 10:32:38 2013
@@ -22,9 +22,9 @@ import java.io.IOException;
 import java.util.Map;
 
 import org.apache.hadoop.fs.Path;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.apache.hama.ml.ann.SmallLayeredNeuralNetwork;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
 
 /**
  * The logistic regression model. It can be used to conduct 2-class

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegressionModel.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegressionModel.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegressionModel.java
(original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/LogisticRegressionModel.java
Thu Oct 31 10:32:38 2013
@@ -20,7 +20,7 @@ package org.apache.hama.ml.regression;
 import java.math.BigDecimal;
 import java.math.MathContext;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * A {@link RegressionModel} for logistic regression

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/RegressionModel.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/RegressionModel.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/RegressionModel.java (original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/RegressionModel.java Thu Oct
31 10:32:38 2013
@@ -19,7 +19,7 @@ package org.apache.hama.ml.regression;
 
 import java.math.BigDecimal;
 
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * A cost model for gradient descent based regression

Modified: hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormat.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormat.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormat.java
(original)
+++ hama/trunk/ml/src/main/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormat.java
Thu Oct 31 10:32:38 2013
@@ -17,6 +17,9 @@
  */
 package org.apache.hama.ml.regression;
 
+import java.io.IOException;
+import java.io.InputStream;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
@@ -27,13 +30,14 @@ import org.apache.hadoop.io.DoubleWritab
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.compress.CompressionCodec;
 import org.apache.hadoop.io.compress.CompressionCodecFactory;
-import org.apache.hama.bsp.*;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
-
-import java.io.IOException;
-import java.io.InputStream;
+import org.apache.hama.bsp.BSPJob;
+import org.apache.hama.bsp.FileInputFormat;
+import org.apache.hama.bsp.FileSplit;
+import org.apache.hama.bsp.InputSplit;
+import org.apache.hama.bsp.RecordReader;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 /**
  * A {@link FileInputFormat} for files containing one vector and one double per

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestAutoEncoder.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestAutoEncoder.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestAutoEncoder.java (original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestAutoEncoder.java Thu Oct 31 10:32:38
2013
@@ -36,10 +36,10 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.SequenceFile;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 import org.apache.hama.ml.MLTestBase;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.mortbay.log.Log;

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetwork.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetwork.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetwork.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetwork.java
Thu Oct 31 10:32:38 2013
@@ -38,15 +38,15 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.SequenceFile;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleMatrix;
+import org.apache.hama.commons.math.DoubleVector;
+import org.apache.hama.commons.math.FunctionFactory;
 import org.apache.hama.ml.MLTestBase;
 import org.apache.hama.ml.ann.AbstractLayeredNeuralNetwork.LearningStyle;
 import org.apache.hama.ml.ann.AbstractLayeredNeuralNetwork.TrainingMethod;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.math.FunctionFactory;
-import org.apache.hama.ml.writable.VectorWritable;
 import org.junit.Test;
 import org.mortbay.log.Log;
 

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetworkMessage.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetworkMessage.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetworkMessage.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/ann/TestSmallLayeredNeuralNetworkMessage.java
Thu Oct 31 10:32:38 2013
@@ -32,8 +32,8 @@ import org.apache.hadoop.fs.FSDataInputS
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DoubleMatrix;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DoubleMatrix;
 import org.junit.Test;
 
 /**
@@ -86,7 +86,7 @@ public class TestSmallLayeredNeuralNetwo
 
       DoubleMatrix[] readPrevMatrices = readMessage.getPrevMatrices();
       assertNull(readPrevMatrices);
-      
+
       // delete
       fs.delete(path, true);
     } catch (IOException e) {

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/kmeans/TestKMeansBSP.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/kmeans/TestKMeansBSP.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/kmeans/TestKMeansBSP.java (original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/kmeans/TestKMeansBSP.java Thu Oct 31 10:32:38
2013
@@ -28,8 +28,7 @@ import org.apache.hadoop.fs.FSDataOutput
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hama.bsp.BSPJob;
-import org.apache.hama.ml.kmeans.KMeansBSP;
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 
 public class TestKMeansBSP extends TestCase {
 

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMLPMessage.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMLPMessage.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMLPMessage.java (original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMLPMessage.java Thu
Oct 31 10:32:38 2013
@@ -29,7 +29,7 @@ import org.apache.hadoop.fs.FSDataInputS
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
 import org.junit.Test;
 
 /**

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMultiLayerPerceptron.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMultiLayerPerceptron.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMultiLayerPerceptron.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/perception/TestSmallMultiLayerPerceptron.java
Thu Oct 31 10:32:38 2013
@@ -19,7 +19,6 @@ package org.apache.hama.ml.perception;
 
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
 
 import java.io.IOException;
 import java.net.URI;
@@ -34,12 +33,12 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.LongWritable;
 import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.WritableUtils;
-import org.apache.hama.ml.math.DenseDoubleMatrix;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleMatrix;
-import org.apache.hama.ml.math.DoubleVector;
-import org.apache.hama.ml.writable.MatrixWritable;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.MatrixWritable;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleMatrix;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleMatrix;
+import org.apache.hama.commons.math.DoubleVector;
 import org.junit.Test;
 import org.mortbay.log.Log;
 

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LinearRegressionModelTest.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LinearRegressionModelTest.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LinearRegressionModelTest.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LinearRegressionModelTest.java
Thu Oct 31 10:32:38 2013
@@ -21,8 +21,8 @@ import static org.junit.Assert.assertEqu
 
 import java.math.BigDecimal;
 
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 import org.junit.Test;
 
 /**

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LogisticRegressionModelTest.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LogisticRegressionModelTest.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LogisticRegressionModelTest.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/LogisticRegressionModelTest.java
Thu Oct 31 10:32:38 2013
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertFal
 
 import java.math.BigDecimal;
 
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 import org.junit.Test;
 
 /**

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLinearRegression.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLinearRegression.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLinearRegression.java (original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLinearRegression.java Thu
Oct 31 10:32:38 2013
@@ -25,8 +25,8 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 import org.junit.Test;
 import org.mortbay.log.Log;
 

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLogisticRegression.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLogisticRegression.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLogisticRegression.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/TestLogisticRegression.java
Thu Oct 31 10:32:38 2013
@@ -26,8 +26,8 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.math.DoubleVector;
+import org.apache.hama.commons.math.DenseDoubleVector;
+import org.apache.hama.commons.math.DoubleVector;
 import org.junit.Test;
 import org.mortbay.log.Log;
 

Modified: hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormatTest.java
URL: http://svn.apache.org/viewvc/hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormatTest.java?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormatTest.java
(original)
+++ hama/trunk/ml/src/test/java/org/apache/hama/ml/regression/VectorDoubleFileInputFormatTest.java
Thu Oct 31 10:32:38 2013
@@ -17,18 +17,20 @@
  */
 package org.apache.hama.ml.regression;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.DoubleWritable;
 import org.apache.hama.bsp.BSPJob;
 import org.apache.hama.bsp.FileSplit;
 import org.apache.hama.bsp.InputSplit;
 import org.apache.hama.bsp.RecordReader;
-import org.apache.hama.ml.math.DenseDoubleVector;
-import org.apache.hama.ml.writable.VectorWritable;
+import org.apache.hama.commons.io.VectorWritable;
+import org.apache.hama.commons.math.DenseDoubleVector;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 /**
  * Testcase for {@link VectorDoubleFileInputFormat}
  */

Modified: hama/trunk/pom.xml
URL: http://svn.apache.org/viewvc/hama/trunk/pom.xml?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/pom.xml (original)
+++ hama/trunk/pom.xml Thu Oct 31 10:32:38 2013
@@ -282,6 +282,7 @@
 
   <modules>
     <module>c++</module>
+    <module>commons</module>
     <module>core</module>
     <module>graph</module>
     <module>examples</module>

Modified: hama/trunk/src/assemble/bin.xml
URL: http://svn.apache.org/viewvc/hama/trunk/src/assemble/bin.xml?rev=1537427&r1=1537426&r2=1537427&view=diff
==============================================================================
--- hama/trunk/src/assemble/bin.xml (original)
+++ hama/trunk/src/assemble/bin.xml Thu Oct 31 10:32:38 2013
@@ -27,6 +27,18 @@
   
   <fileSets>
     <fileSet>
+      <directory>../commons/target</directory>
+      <includes>
+        <include>hama-*.jar</include>
+      </includes>
+      <excludes>
+        <exclude>*sources.jar</exclude>
+        <exclude>*tests.jar</exclude>
+        <exclude>*javadoc.jar</exclude>
+      </excludes>
+      <outputDirectory>../hama-${project.version}/</outputDirectory>
+    </fileSet>
+    <fileSet>
       <directory>../core/target</directory>
       <includes>
         <include>hama-*.jar</include>



Mime
View raw message