View source: R/print.rfpredinterval.R
print.rfpredinterval | R Documentation |
Print summary output from pibf()
, rfpi()
, or piall()
functions. This is the default print method for the package.
## S3 method for class 'rfpredinterval' print(x, ...)
x |
An object of class |
... |
Optional arguments to be passed to other methods. |
pibf
piall
rfpi
## load example data data(BostonHousing, package = "RFpredInterval") set.seed(2345) ## define train/test split testindex <- 1:10 trainindex <- sample(11:nrow(BostonHousing), size = 100, replace = FALSE) traindata <- BostonHousing[trainindex, ] testdata <- BostonHousing[testindex, ] px <- ncol(BostonHousing) - 1 ## construct 95% PI with "cv" calibration using 5-folds out <- pibf(formula = medv ~ ., traindata = traindata, testdata = testdata, calibration = "oob", params_ranger = list(num.trees = 40)) ## print summary output print(out) ## contruct 95% PI with "ls" split rule, "lm", "quant" and "spi" PI methods ## with calibration and use "ranger" package for RF training out2 <- rfpi(formula = medv ~ ., traindata = traindata, testdata = testdata, split_rule = "ls", pi_method = c("lm", "quant", "spi"), rf_package = "ranger", params_ranger = list(num.trees = 50)) ## print summary output print(out2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.