Repository: spark
Updated Branches:
  refs/heads/master 9fd13d561 -> 4e4f74b5e


[SPARK-8660] [MLLIB] removed > symbols from comments in 
LogisticRegressionSuite.scala for ease of copypaste

'>' symbols removed from comments in LogisticRegressionSuite.scala, for ease of 
copypaste

also single-lined the multiline commands (is this desirable, or does it violate 
style?)

Author: Rosstin <astera...@gmail.com>

Closes #7167 from Rosstin/SPARK-8660-2 and squashes the following commits:

f4b9bc8 [Rosstin] SPARK-8660 restored character limit on multiline comments in 
LogisticRegressionSuite.scala
fe6b112 [Rosstin] SPARK-8660 > symbols removed from 
LogisticRegressionSuite.scala for easy of copypaste
39ddd50 [Rosstin] Merge branch 'master' of github.com:apache/spark into 
SPARK-8661
5a05dee [Rosstin] SPARK-8661 for LinearRegressionSuite.scala, changed 
javadoc-style comments to regular multiline comments to make it easier to 
copy-paste the R code.
bb9a4b1 [Rosstin] Merge branch 'master' of github.com:apache/spark into 
SPARK-8660
242aedd [Rosstin] SPARK-8660, changed comment style from JavaDoc style to 
normal multiline comment in order to make copypaste into R easier, in file 
classification/LogisticRegressionSuite.scala
2cd2985 [Rosstin] Merge branch 'master' of github.com:apache/spark into 
SPARK-8639
21ac1e5 [Rosstin] Merge branch 'master' of github.com:apache/spark into 
SPARK-8639
6c18058 [Rosstin] fixed minor typos in docs/README.md and docs/api.md


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

Branch: refs/heads/master
Commit: 4e4f74b5e1267d1ada4a8f57b86aee0d9c17d90a
Parents: 9fd13d5
Author: Rosstin <astera...@gmail.com>
Authored: Wed Jul 1 21:42:06 2015 -0700
Committer: Xiangrui Meng <m...@databricks.com>
Committed: Wed Jul 1 21:42:06 2015 -0700

----------------------------------------------------------------------
 .../LogisticRegressionSuite.scala               | 117 ++++++++++---------
 1 file changed, 63 insertions(+), 54 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/4e4f74b5/mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
----------------------------------------------------------------------
diff --git 
a/mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
 
b/mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
index bc6eeac..ba8fbee 100644
--- 
a/mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
+++ 
b/mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala
@@ -214,12 +214,13 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 0, 
lambda = 0))
-       > weights
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 0, 
lambda = 0))
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                            s0
        (Intercept)  2.8366423
@@ -245,13 +246,14 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights =
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights =
            coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 
0, intercept=FALSE))
-       > weights
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                            s0
        (Intercept)   .
@@ -278,12 +280,13 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 1, 
lambda = 0.12))
-       > weights
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 1, 
lambda = 0.12))
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept) -0.05627428
@@ -310,13 +313,14 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 1, 
lambda = 0.12,
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 1, 
lambda = 0.12,
            intercept=FALSE))
-       > weights
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept)   .
@@ -343,12 +347,13 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 0, 
lambda = 1.37))
-       > weights
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 0, 
lambda = 1.37))
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept)  0.15021751
@@ -375,13 +380,14 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 0, 
lambda = 1.37,
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 0, 
lambda = 1.37,
            intercept=FALSE))
-       > weights
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept)   .
@@ -408,12 +414,13 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 
0.38, lambda = 0.21))
-       > weights
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 0.38, 
lambda = 0.21))
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept)  0.57734851
@@ -440,13 +447,14 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 
0.38, lambda = 0.21,
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 0.38, 
lambda = 0.21,
            intercept=FALSE))
-       > weights
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept)   .
@@ -503,12 +511,13 @@ class LogisticRegressionSuite extends SparkFunSuite with 
MLlibTestSparkContext {
     /*
        Using the following R code to load the data and train the model using 
glmnet package.
 
-       > library("glmnet")
-       > data <- read.csv("path", header=FALSE)
-       > label = factor(data$V1)
-       > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
-       > weights = coef(glmnet(features,label, family="binomial", alpha = 1.0, 
lambda = 6.0))
-       > weights
+       library("glmnet")
+       data <- read.csv("path", header=FALSE)
+       label = factor(data$V1)
+       features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
+       weights = coef(glmnet(features,label, family="binomial", alpha = 1.0, 
lambda = 6.0))
+       weights
+
        5 x 1 sparse Matrix of class "dgCMatrix"
                             s0
        (Intercept) -0.2480643


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to