piall | R Documentation |
Constructs prediction intervals with the 16 methods (PIBF method implemented
in pibf()
and 15 method variations implemented in rfpi()
).
piall( formula, traindata, testdata, alpha = 0.05, num.trees = 2000, mtry = ceiling(px/3) )
formula |
Object of class |
traindata |
Training data of class |
testdata |
Test data of class |
alpha |
Confidence level. (1 - |
num.trees |
Number of trees. The default is |
mtry |
Number of variables randomly selected as candidates for splitting a node. The default is rounded up px/3 where px is the number of variables. |
A list with the following components:
PIBF |
Prediction intervals for test data with PIBF method. A list containing lower and upper bounds. |
LS_LM |
Prediction intervals for test data with least-squares (LS) splitting rule and classical method (LM). A list containing lower and upper bounds. |
LS_SPI |
Prediction intervals for test data with least-squares (LS) splitting rule and shortest PI (SPI) method. A list containing lower and upper bounds. |
LS_Quant |
Prediction intervals for test data with least-squares (LS) splitting rule and quantiles method. A list containing lower and upper bounds. |
LS_HDR |
Prediction intervals for test data with least-squares (LS) splitting rule and highest density region (HDR) method. A list containing lower and upper bounds of prediction interval for each test observation. There may be multiple PIs for a single observation. |
LS_CHDR |
Prediction intervals for test data with least-squares (LS) splitting rule and contiguous HDR method. A list containing lower and upper bounds. |
L1_LM |
Prediction intervals for test data with L_1 splitting rule and classical method (LM). A list containing lower and upper bounds. |
L1_SPI |
Prediction intervals for test data with L_1 splitting rule and shortest PI (SPI) method. A list containing lower and upper bounds. |
L1_Quant |
Prediction intervals for test data with L_1 splitting rule and quantiles method. A list containing lower and upper bounds. |
L1_HDR |
Prediction intervals for test data with L_1 splitting rule and highest density region (HDR) method. A list containing lower and upper bounds of prediction interval for each test observation. There may be multiple PIs for a single observation. |
L1_CHDR |
Prediction intervals for test data with L_1 splitting rule and contiguous HDR method. A list containing lower and upper bounds. |
SPI_LM |
Prediction intervals for test data with shortest PI (SPI) splitting rule and classical method (LM). A list containing lower and upper bounds. |
SPI_SPI |
Prediction intervals for test data with shortest PI (SPI) splitting rule and shortest PI (SPI) method. A list containing lower and upper bounds. |
SPI_Quant |
Prediction intervals for test data with shortest PI (SPI) splitting rule and quantiles method. A list containing lower and upper bounds. |
SPI_HDR |
Prediction intervals for test data with shortest PI (SPI) splitting rule and highest density region (HDR) method. A list containing lower and upper bounds of prediction interval for each test observation. There may be multiple PIs for a single observation. |
SPI_CHDR |
Prediction intervals for test data with shortest PI (SPI) splitting rule and contiguous HDR method. A list containing lower and upper bounds. |
pred_pibf |
Bias-corrected random forest predictions for test data. |
pred_ls |
Random forest predictions for test data with least-squares (LS) splitting rule. |
pred_l1 |
Random forest predictions for test data with L_1 splitting rule. |
pred_spi |
Random forest predictions for test data with shortest PI (SPI) splitting rule. |
test_response |
If available, true response values of the test data.
Otherwise, |
pibf
rfpi
plot.rfpredinterval
print.rfpredinterval
## load example data data(BostonHousing, package = "RFpredInterval") set.seed(2345) ## define train/test split testindex <- 1 trainindex <- sample(2:nrow(BostonHousing), size = 50, replace = FALSE) traindata <- BostonHousing[trainindex, ] testdata <- BostonHousing[testindex, ] ## construct 95% PI with 16 methods for the first observation in testdata out <- piall(formula = medv ~ ., traindata = traindata, testdata = testdata, num.trees = 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.