Created
July 15, 2018 23:47
-
-
Save halflearned/1ed2180ce790d2bb63040b38a31f5369 to your computer and use it in GitHub Desktop.
DiceKriging-related bugs in grf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(grf) | |
n <- 100 | |
k <- 3 | |
X <- matrix(rnorm(n*k), n, k) | |
# Outcome is constant! | |
Y_constant <- matrix(rep(0, n)) | |
# Outcome is almost constant! | |
Y_almostconstant <- matrix(rep(0, n)) | |
Y_almostconstant[1] <- 1 | |
# This part happens inside | |
cat("I'm about to say something about the learning minor or order 1\n") | |
tryCatch( | |
grf::regression_forest(X=X, Y=Y_constant, tune.parameters = TRUE), | |
ecrror=function(e) print(e) | |
) | |
cat("I'm about to say something about an argument not being a matrix\n") | |
tryCatch( | |
grf::regression_forest(X=X, Y=Y_almostconstant, tune.parameters = TRUE), | |
error=function(e) print(e) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment