spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yanboliang <...@git.apache.org>
Subject [GitHub] spark pull request #15851: [SPARK-18412][SPARKR][ML] Fix exception for some ...
Date Fri, 11 Nov 2016 12:08:46 GMT
Github user yanboliang commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15851#discussion_r87578281
  
    --- Diff: R/pkg/inst/tests/testthat/test_mllib.R ---
    @@ -971,10 +971,15 @@ test_that("spark.randomForest Classification", {
       predictions <- collect(predict(model, data))$prediction
       expect_equal(length(grep("1.0", predictions)), 50)
       expect_equal(length(grep("2.0", predictions)), 50)
    +
    +  # spark.randomForest classification can work on libsvm data
    +  data <- read.df(absoluteSparkPath("data/mllib/sample_multiclass_classification_data.txt"),
    +                source = "libsvm")
    +  model <- spark.randomForest(data, label ~ features, "classification")
    +  expect_equal(summary(model)$numFeatures, 4)
     })
     
    -test_that("spark.gbt", {
    -  # regression
    +test_that("spark.gbt regression", {
    --- End diff --
    
    Divide ```spark.gbt``` test case into two parts: regression and classification. This will
more clear and is consistent with ```spark.randomForest```.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message