Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do NAN and 0 appear when the argument is SE for function predict? #633

Open
A-Pai opened this issue Aug 12, 2022 · 0 comments
Open

Why do NAN and 0 appear when the argument is SE for function predict? #633

A-Pai opened this issue Aug 12, 2022 · 0 comments

Comments

@A-Pai
Copy link

A-Pai commented Aug 12, 2022

library(ranger)

ames <- as.data.frame(AmesHousing::make_ames())
set.seed(111)
I <- sample(nrow(ames), nrow(ames) * 0.99)
rf <- ranger(Sale_Price ~ ., data = ames[I, ], keep.inbag = TRUE, seed = 111)
pred1 <- predict(rf, ames[-I, ], type = "se") # se.method="infjack"(default)
pred2 <- predict(rf, ames[-I, ], type = "se", se.method = "jack")

cat(pred1$se)
cat("\n\n")
cat(pred2$se)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant