Skip to content

Commit

Permalink
Merge 7b5ec66 into 82b7b24
Browse files Browse the repository at this point in the history
  • Loading branch information
mnwright committed Mar 7, 2019
2 parents 82b7b24 + 7b5ec66 commit 248dd25
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 34 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: ranger
Type: Package
Title: A Fast Implementation of Random Forests
Version: 0.11.1
Date: 2019-01-24
Version: 0.11.2
Date: 2019-03-07
Author: Marvin N. Wright [aut, cre], Stefan Wager [ctb], Philipp Probst [ctb]
Maintainer: Marvin N. Wright <cran@wrig.de>
Description: A fast implementation of Random Forests, particularly suited for high
Expand Down
3 changes: 3 additions & 0 deletions NEWS
@@ -1,3 +1,6 @@
##### Version 0.11.2
* Bug fixes

##### Version 0.11.1
* Bug fixes

Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
@@ -1,3 +1,6 @@
##### Version 0.11.2
* Bug fixes

##### Version 0.11.1
* Bug fixes

Expand Down
2 changes: 1 addition & 1 deletion cpp_version/src/version.h
@@ -1,3 +1,3 @@
#ifndef RANGER_VERSION
#define RANGER_VERSION "0.11.1"
#define RANGER_VERSION "0.11.2"
#endif
31 changes: 0 additions & 31 deletions tests/testthat/test_jackknife.R
Expand Up @@ -129,37 +129,6 @@ test_that("standard error response prediction is the same as response prediction
expect_equal(pred_se$predictions, pred_resp$predictions)
})

test_that("standard error is larger for fewer trees, regression", {
idx <- sample(nrow(iris), 25)
test <- iris[idx, ]
train <- iris[-idx, ]

rf5 <- ranger(Petal.Length ~ ., train, num.trees = 5, keep.inbag = TRUE)
pred5_jack <- predict(rf5, test, type = "se", se.method = "jack")
pred5_ij <- predict(rf5, test, type = "se", se.method = "infjack")

rf50 <- ranger(Petal.Length ~ ., train, num.trees = 50, keep.inbag = TRUE)
pred50_jack <- predict(rf50, test, type = "se", se.method = "jack")
pred50_ij <- predict(rf50, test, type = "se", se.method = "infjack")

expect_lt(mean(pred50_jack$se), mean(pred5_jack$se))
expect_lt(mean(pred50_ij$se), mean(pred5_ij$se))
})

test_that("standard error is larger for fewer trees, probability", {
idx <- sample(nrow(iris), 25)
test <- iris[idx, ]
train <- iris[-idx, ]

rf5 <- ranger(Species ~ ., train, num.trees = 5, keep.inbag = TRUE, probability = TRUE)
pred5 <- predict(rf5, test, type = "se", se.method = "infjack")

rf50 <- ranger(Petal.Length ~ ., train, num.trees = 50, keep.inbag = TRUE)
pred50 <- predict(rf50, test, type = "se", se.method = "infjack")

expect_lt(mean(pred50$se), mean(pred5$se))
})

test_that("Warning for few observations with IJ", {
idx <- sample(nrow(iris), 10)
test <- iris[idx, ]
Expand Down

0 comments on commit 248dd25

Please sign in to comment.