rescale_predictions | R Documentation |
This function rescales the predicted values (prediction
, prediction_lower
,
prediction_upper
). The scaling is reversed using the means and
standard deviations that were saved from the training data. It is the inverse
function to scale_data()
and should be used only in combination.
rescale_predictions(scale_result, dt_predictions)
scale_result |
A list object returned by |
dt_predictions |
A data frame containing the predictions,
including columns |
A data frame with the predictions and numeric columns rescaled back to their original scale.
data(mock_env_data)
scale_res <- scale_data(
train_data = mock_env_data[1:80, ],
apply_data = mock_env_data[81:100, ]
)
params <- load_params()
res <- run_lightgbm(
train = scale_res$train, test = scale_res$apply,
params$lightgbm, alpha = 0.9, calc_shaps = FALSE
)
dt_predictions <- res$dt_predictions
rescaled_predictions <- rescale_predictions(scale_res, dt_predictions)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.