Skip to content

Commit

Permalink
Update test_lm_forest.R (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikcs authored Oct 3, 2024
1 parent 8df5a52 commit 2f3b8c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion r-package/grf/tests/testthat/test_lm_forest.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ test_that("lm_forest gradient.weights option works as expected", {
K <- 2
X <- matrix(rnorm(n * p), n, p)
W <- matrix(runif(n * K), n, K)
Y <- X[, 1] - W[, 1] * pmax(X[, 2], 0) + W[, 2] + rnorm(n)
Y <- X[, 1] - W[, 1] * pmax(X[, 1], 0) + W[, 2] + rnorm(n)

lmf <- lm_forest(X, Y, W, num.trees = 250, gradient.weights = c(0.5, 1), seed = 42)
lmf2 <- lm_forest(X, cbind(Y, Y), W, num.trees = 250, gradient.weights = c(0.5, 1), seed = 42)
Expand Down

0 comments on commit 2f3b8c1

Please sign in to comment.