Skip to content

Commit

Permalink
SPARK-8660 > symbols removed from LogisticRegressionSuite.scala for e…
Browse files Browse the repository at this point in the history
…asy of copypaste
  • Loading branch information
Rosstin committed Jul 1, 2015
1 parent 39ddd50 commit fe6b112
Showing 1 changed file with 66 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
val weights = Array(-0.57997, 0.912083, -0.371077, -0.819866, 2.688191)
val xMean = Array(5.843, 3.057, 3.758, 1.199)
val xVariance = Array(0.6856, 0.1899, 3.116, 0.581)
val data = sc.parallelize(LogisticRegressionSuite.generateMultinomialLogisticInput(
weights, xMean, xVariance, true, nPoints, 42), 1)
data.map(x=> x.label + ", " + x.features(0) + ", " + x.features(1) + ", "
+ x.features(2) + ", " + x.features(3)).saveAsTextFile("path")
val data = sc.parallelize(LogisticRegressionSuite.generateMultinomialLogisticInput(weights, xMean, xVariance, true, nPoints, 42), 1)
data.map(x=> x.label + ", " + x.features(0) + ", " + x.features(1) + ", " + x.features(2) + ", " + x.features(3)).saveAsTextFile("path")
*/
binaryDataset = {
val nPoints = 10000
Expand Down Expand Up @@ -214,12 +213,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
Expand All @@ -245,13 +245,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, intercept=FALSE))
> 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
5 x 1 sparse Matrix of class "dgCMatrix"
s0
(Intercept) .
Expand All @@ -278,12 +278,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
Expand All @@ -310,13 +311,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,
intercept=FALSE))
> 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, intercept=FALSE))
weights
5 x 1 sparse Matrix of class "dgCMatrix"
s0
(Intercept) .
Expand All @@ -343,12 +344,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
Expand All @@ -375,13 +377,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,
intercept=FALSE))
> 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, intercept=FALSE))
weights
5 x 1 sparse Matrix of class "dgCMatrix"
s0
(Intercept) .
Expand All @@ -408,12 +410,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
Expand All @@ -440,13 +443,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,
intercept=FALSE))
> 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, intercept=FALSE))
weights
5 x 1 sparse Matrix of class "dgCMatrix"
s0
(Intercept) .
Expand Down Expand Up @@ -503,12 +506,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
Expand Down

0 comments on commit fe6b112

Please sign in to comment.