@@ -214,12 +214,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
214
214
/*
215
215
Using the following R code to load the data and train the model using glmnet package.
216
216
217
- > library("glmnet")
218
- > data <- read.csv("path", header=FALSE)
219
- > label = factor(data$V1)
220
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
221
- > weights = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 0))
222
- > weights
217
+ library("glmnet")
218
+ data <- read.csv("path", header=FALSE)
219
+ label = factor(data$V1)
220
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
221
+ weights = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 0))
222
+ weights
223
+
223
224
5 x 1 sparse Matrix of class "dgCMatrix"
224
225
s0
225
226
(Intercept) 2.8366423
@@ -245,13 +246,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
245
246
/*
246
247
Using the following R code to load the data and train the model using glmnet package.
247
248
248
- > library("glmnet")
249
- > data <- read.csv("path", header=FALSE)
250
- > label = factor(data$V1)
251
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
252
- > weights =
249
+ library("glmnet")
250
+ data <- read.csv("path", header=FALSE)
251
+ label = factor(data$V1)
252
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
253
+ weights =
253
254
coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 0, intercept=FALSE))
254
- > weights
255
+ weights
256
+
255
257
5 x 1 sparse Matrix of class "dgCMatrix"
256
258
s0
257
259
(Intercept) .
@@ -278,12 +280,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
278
280
/*
279
281
Using the following R code to load the data and train the model using glmnet package.
280
282
281
- > library("glmnet")
282
- > data <- read.csv("path", header=FALSE)
283
- > label = factor(data$V1)
284
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
285
- > weights = coef(glmnet(features,label, family="binomial", alpha = 1, lambda = 0.12))
286
- > weights
283
+ library("glmnet")
284
+ data <- read.csv("path", header=FALSE)
285
+ label = factor(data$V1)
286
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
287
+ weights = coef(glmnet(features,label, family="binomial", alpha = 1, lambda = 0.12))
288
+ weights
289
+
287
290
5 x 1 sparse Matrix of class "dgCMatrix"
288
291
s0
289
292
(Intercept) -0.05627428
@@ -310,13 +313,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
310
313
/*
311
314
Using the following R code to load the data and train the model using glmnet package.
312
315
313
- > library("glmnet")
314
- > data <- read.csv("path", header=FALSE)
315
- > label = factor(data$V1)
316
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
317
- > weights = coef(glmnet(features,label, family="binomial", alpha = 1, lambda = 0.12,
316
+ library("glmnet")
317
+ data <- read.csv("path", header=FALSE)
318
+ label = factor(data$V1)
319
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
320
+ weights = coef(glmnet(features,label, family="binomial", alpha = 1, lambda = 0.12,
318
321
intercept=FALSE))
319
- > weights
322
+ weights
323
+
320
324
5 x 1 sparse Matrix of class "dgCMatrix"
321
325
s0
322
326
(Intercept) .
@@ -343,12 +347,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
343
347
/*
344
348
Using the following R code to load the data and train the model using glmnet package.
345
349
346
- > library("glmnet")
347
- > data <- read.csv("path", header=FALSE)
348
- > label = factor(data$V1)
349
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
350
- > weights = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 1.37))
351
- > weights
350
+ library("glmnet")
351
+ data <- read.csv("path", header=FALSE)
352
+ label = factor(data$V1)
353
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
354
+ weights = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 1.37))
355
+ weights
356
+
352
357
5 x 1 sparse Matrix of class "dgCMatrix"
353
358
s0
354
359
(Intercept) 0.15021751
@@ -375,13 +380,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
375
380
/*
376
381
Using the following R code to load the data and train the model using glmnet package.
377
382
378
- > library("glmnet")
379
- > data <- read.csv("path", header=FALSE)
380
- > label = factor(data$V1)
381
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
382
- > weights = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 1.37,
383
+ library("glmnet")
384
+ data <- read.csv("path", header=FALSE)
385
+ label = factor(data$V1)
386
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
387
+ weights = coef(glmnet(features,label, family="binomial", alpha = 0, lambda = 1.37,
383
388
intercept=FALSE))
384
- > weights
389
+ weights
390
+
385
391
5 x 1 sparse Matrix of class "dgCMatrix"
386
392
s0
387
393
(Intercept) .
@@ -408,12 +414,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
408
414
/*
409
415
Using the following R code to load the data and train the model using glmnet package.
410
416
411
- > library("glmnet")
412
- > data <- read.csv("path", header=FALSE)
413
- > label = factor(data$V1)
414
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
415
- > weights = coef(glmnet(features,label, family="binomial", alpha = 0.38, lambda = 0.21))
416
- > weights
417
+ library("glmnet")
418
+ data <- read.csv("path", header=FALSE)
419
+ label = factor(data$V1)
420
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
421
+ weights = coef(glmnet(features,label, family="binomial", alpha = 0.38, lambda = 0.21))
422
+ weights
423
+
417
424
5 x 1 sparse Matrix of class "dgCMatrix"
418
425
s0
419
426
(Intercept) 0.57734851
@@ -440,13 +447,14 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
440
447
/*
441
448
Using the following R code to load the data and train the model using glmnet package.
442
449
443
- > library("glmnet")
444
- > data <- read.csv("path", header=FALSE)
445
- > label = factor(data$V1)
446
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
447
- > weights = coef(glmnet(features,label, family="binomial", alpha = 0.38, lambda = 0.21,
450
+ library("glmnet")
451
+ data <- read.csv("path", header=FALSE)
452
+ label = factor(data$V1)
453
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
454
+ weights = coef(glmnet(features,label, family="binomial", alpha = 0.38, lambda = 0.21,
448
455
intercept=FALSE))
449
- > weights
456
+ weights
457
+
450
458
5 x 1 sparse Matrix of class "dgCMatrix"
451
459
s0
452
460
(Intercept) .
@@ -503,12 +511,13 @@ class LogisticRegressionSuite extends SparkFunSuite with MLlibTestSparkContext {
503
511
/*
504
512
Using the following R code to load the data and train the model using glmnet package.
505
513
506
- > library("glmnet")
507
- > data <- read.csv("path", header=FALSE)
508
- > label = factor(data$V1)
509
- > features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
510
- > weights = coef(glmnet(features,label, family="binomial", alpha = 1.0, lambda = 6.0))
511
- > weights
514
+ library("glmnet")
515
+ data <- read.csv("path", header=FALSE)
516
+ label = factor(data$V1)
517
+ features = as.matrix(data.frame(data$V2, data$V3, data$V4, data$V5))
518
+ weights = coef(glmnet(features,label, family="binomial", alpha = 1.0, lambda = 6.0))
519
+ weights
520
+
512
521
5 x 1 sparse Matrix of class "dgCMatrix"
513
522
s0
514
523
(Intercept) -0.2480643
0 commit comments