Skip to content

Commit

Permalink
assert minimal num of uniques to split for regression
Browse files Browse the repository at this point in the history
  • Loading branch information
bcjaeger committed Nov 16, 2023
1 parent 6e6b1a2 commit 3935769
Show file tree
Hide file tree
Showing 7 changed files with 64,526 additions and 13 deletions.
10 changes: 4 additions & 6 deletions R/orsf_R6.R
Original file line number Diff line number Diff line change
Expand Up @@ -3465,12 +3465,10 @@ ObliqueForestRegression <- R6::R6Class(

stop("user-supplied function encountered an error when it was tested. ",
"Please make sure the function works for this case:\n\n",
".x_node <- matrix(seq(-1, 1, length.out = 300), ncol = 3)\n\n",
"test_time <- seq(from = 1, to = 5, length.out = 100)\n",
"test_status <- rep(c(0,1), each = 50)\n",
".y_node <- cbind(time = test_time, status = test_status)\n\n",
".w_node <- matrix(rep(c(1,2,3,4), each = 25), ncol = 1)\n\n",
"test_output <- beta_fun(.x_node, .y_node, .w_node)\n\n",
".x_node <- matrix(rnorm(300), ncol = 3)\n",
".y_node <- matrix(rnorm(100), ncol = 1)\n",
".w_node <- matrix(rep(c(1,2,3,4), each = 25), ncol = 1)\n",
"test_output <- your_function(.x_node, .y_node, .w_node)\n\n",
"test_output should be a numeric matrix with 1 column and",
" with nrow(test_output) = ncol(.x_node)",
call. = FALSE)
Expand Down
Loading

0 comments on commit 3935769

Please sign in to comment.