View source: R/get_calibrated_nodes.R
get_calibrated_nodes | R Documentation |
get_calibrated_nodes
calculates lower and upper limit for prediction interval for each observation of the test data set
using mondrian conformal prediction
get_calibrated_nodes(
y_cal_pred,
y_cal,
y_test_pred,
significance_level,
tree,
cal_data,
test_data,
dependent_varname,
calibrate_all_nodes = FALSE
)
y_cal_pred |
Predictions of decision tree for calibration set. |
y_cal |
True label of outcome variable for calibration set. Has to be in the same order as y_cal_pred. |
y_test_pred |
Predictions of test data set that should be calibrated. |
significance_level |
Level of uncertainty that should be reached by calibration, should be between 0 and 1. |
tree |
Tree whose predictions are to be calibrated, tree should be an object of class |
cal_data |
Data frame with calibration data (should contain same variables as train data). |
test_data |
Data frame with test data (should contain same variables as train data). |
dependent_varname |
Name of the dependent variable used to create the tree. |
calibrate_all_nodes |
If TRUE prediction interval is calculated for all nodes, if FALSE only for termial nodes. |
data frame with point prediction and lower and upper bound of prediction interval for nodes.
Lea Louisa Kronziel, M.Sc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.