Skip to content
Snippets Groups Projects
Commit 4e4f74b5 authored by Rosstin's avatar Rosstin Committed by Xiangrui Meng
Browse files

[SPARK-8660] [MLLIB] removed > symbols from comments in...

[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 <asterazul@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
parent 9fd13d56
No related branches found
No related tags found
No related merge requests found
...@@ -214,12 +214,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 0))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) 2.8366423 (Intercept) 2.8366423
...@@ -245,13 +246,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
> weights = weights =
coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 0, intercept=FALSE)) coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 0, intercept=FALSE))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) . (Intercept) .
...@@ -278,12 +280,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 1, lambda = 0.12))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) -0.05627428 (Intercept) -0.05627428
...@@ -310,13 +313,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 1, lambda = 0.12,
intercept=FALSE)) intercept=FALSE))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) . (Intercept) .
...@@ -343,12 +347,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 1.37))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) 0.15021751 (Intercept) 0.15021751
...@@ -375,13 +380,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 1.37,
intercept=FALSE)) intercept=FALSE))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) . (Intercept) .
...@@ -408,12 +414,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 0.38, lambda = 0.21))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) 0.57734851 (Intercept) 0.57734851
...@@ -440,13 +447,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 0.38, lambda = 0.21,
intercept=FALSE)) intercept=FALSE))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) . (Intercept) .
...@@ -503,12 +511,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext { ...@@ -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. Using the following R code to load the data and train the model using glmnet package.
> library("glmnet") library("glmnet")
> data <- read.csv("path", header=FALSE) data <- read.csv("path", header=FALSE)
> label = factor(data$V1) label = factor(data$V1)
> features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5)) 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 = coef(glmnet(features,label, family="binomial", alpha = 1.0, lambda = 6.0))
> weights weights
5 x 1 sparse Matrix of class "dgCMatrix" 5 x 1 sparse Matrix of class "dgCMatrix"
s0 s0
(Intercept) -0.2480643 (Intercept) -0.2480643
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment