flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [ml] [docs] Replaces remaining CoCoA names by SVM
Date Thu, 28 May 2015 15:08:33 GMT
Repository: flink
Updated Branches:
  refs/heads/master 995f8f969 -> d951f1120


[ml] [docs] Replaces remaining CoCoA names by SVM


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/d951f112
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/d951f112
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/d951f112

Branch: refs/heads/master
Commit: d951f1120558dc54d0932c766aaae1416f58e81f
Parents: 995f8f9
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Thu May 28 17:07:53 2015 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Thu May 28 17:07:53 2015 +0200

----------------------------------------------------------------------
 docs/libs/ml/svm.md                                          | 8 ++++----
 .../main/scala/org/apache/flink/ml/classification/SVM.scala  | 4 ++--
 .../org/apache/flink/ml/classification/SVMITSuite.scala      | 6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d951f112/docs/libs/ml/svm.md
----------------------------------------------------------------------
diff --git a/docs/libs/ml/svm.md b/docs/libs/ml/svm.md
index ec5cc6a..a9c94ec 100644
--- a/docs/libs/ml/svm.md
+++ b/docs/libs/ml/svm.md
@@ -59,18 +59,18 @@ The implementation of this algorithm is based on the work of
 
 ## Operations
 
-`CoCoA` is a `Predictor`.
+`SVM` is a `Predictor`.
 As such, it supports the `fit` and `predict` operation.
 
 ### Fit
 
-CoCoA is trained given a set of `LabeledVector`: 
+SVM is trained given a set of `LabeledVector`: 
 
 * `fit: DataSet[LabeledVector] => Unit`
 
 ### Predict
 
-CoCoA predicts for all subtypes of `Vector` the corresponding class label: 
+SVM predicts for all subtypes of `Vector` the corresponding class label: 
 
 * `predict[T <: Vector]: DataSet[T] => DataSet[LabeledVector]`
 
@@ -125,7 +125,7 @@ The SVM implementation can be controlled by the following parameters:
         <td><strong>Regularization</strong></td>
         <td>
           <p>
-            Defines the regularization constant of the CoCoA algorithm. 
+            Defines the regularization constant of the SVM algorithm. 
             The higher the value, the smaller will the 2-norm of the weight vector be. 
             In case of a SVM with hinge loss this means that the SVM margin will be wider
even though it might contain some false classifications.
             (Default value: <strong>1.0</strong>)

http://git-wip-us.apache.org/repos/asf/flink/blob/d951f112/flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/classification/SVM.scala
----------------------------------------------------------------------
diff --git a/flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/classification/SVM.scala
b/flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/classification/SVM.scala
index a08fef2..a186c5d 100644
--- a/flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/classification/SVM.scala
+++ b/flink-staging/flink-ml/src/main/scala/org/apache/flink/ml/classification/SVM.scala
@@ -68,7 +68,7 @@ import breeze.linalg.{Vector => BreezeVector, DenseVector => BreezeDenseVector}
   *          {{{
   *             val trainingDS: DataSet[LabeledVector] = env.readSVMFile(pathToTrainingFile)
   *
-  *             val svm = CoCoA()
+  *             val svm = SVM()
   *               .setBlocks(10)
   *               .setIterations(10)
   *               .setLocalIterations(10)
@@ -103,7 +103,7 @@ import breeze.linalg.{Vector => BreezeVector, DenseVector => BreezeDenseVector}
   *  (Default value: '''10''')
   *
   *  - [[org.apache.flink.ml.classification.SVM.Regularization]]:
-  *  Defines the regularization constant of the CoCoA algorithm. The higher the value, the
smaller
+  *  Defines the regularization constant of the SVM algorithm. The higher the value, the
smaller
   *  will the 2-norm of the weight vector be. In case of a SVM with hinge loss this means
that the
   *  SVM margin will be wider even though it might contain some false classifications.
   *  (Default value: '''1.0''')

http://git-wip-us.apache.org/repos/asf/flink/blob/d951f112/flink-staging/flink-ml/src/test/scala/org/apache/flink/ml/classification/SVMITSuite.scala
----------------------------------------------------------------------
diff --git a/flink-staging/flink-ml/src/test/scala/org/apache/flink/ml/classification/SVMITSuite.scala
b/flink-staging/flink-ml/src/test/scala/org/apache/flink/ml/classification/SVMITSuite.scala
index cdb4ffc..55ef056 100644
--- a/flink-staging/flink-ml/src/test/scala/org/apache/flink/ml/classification/SVMITSuite.scala
+++ b/flink-staging/flink-ml/src/test/scala/org/apache/flink/ml/classification/SVMITSuite.scala
@@ -30,7 +30,7 @@ class SVMITSuite extends FlatSpec with Matchers with FlinkTestBase {
   it should "train a SVM" in {
     val env = ExecutionEnvironment.getExecutionEnvironment
 
-    val cocoa = SVM().
+    val svm = SVM().
     setBlocks(env.getParallelism).
     setIterations(100).
     setLocalIterations(100).
@@ -40,9 +40,9 @@ class SVMITSuite extends FlatSpec with Matchers with FlinkTestBase {
 
     val trainingDS = env.fromCollection(Classification.trainingData)
 
-    cocoa.fit(trainingDS)
+    svm.fit(trainingDS)
 
-    val weightVector = cocoa.weightsOption.get.collect().apply(0)
+    val weightVector = svm.weightsOption.get.collect().apply(0)
 
     weightVector.valuesIterator.zip(Classification.expectedWeightVector.valueIterator).foreach
{
       case (weight, expectedWeight) =>


Mime
View raw message