aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorRosstin <asterazul@gmail.com>2015-07-01 21:42:06 -0700
committerXiangrui Meng <meng@databricks.com>2015-07-01 21:42:06 -0700
commit4e4f74b5e1267d1ada4a8f57b86aee0d9c17d90a (patch)
tree27884fc8bae5a46e462429930716b5fe6a9c6a39 /mllib
parent9fd13d5613b6d16a78d97d4798f085b56107d343 (diff)
downloadspark-4e4f74b5e1267d1ada4a8f57b86aee0d9c17d90a.tar.gz
spark-4e4f74b5e1267d1ada4a8f57b86aee0d9c17d90a.tar.bz2
spark-4e4f74b5e1267d1ada4a8f57b86aee0d9c17d90a.zip
[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
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/test/scala/org/apache/spark/ml/classification/LogisticRegressionSuite.scala117
1 files changed, 63 insertions, 54 deletions
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 bc6eeac1db..ba8fbee841 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