calibration.predx | R Documentation |
Enables post-hoc quantile GAM calibration of the regression predictions
and models using the qgam
tool.
## S3 method for class 'predx'
calibration(
x,
bs = "cr",
k = 20,
qu = 0.5,
form = NULL,
lsig = NULL,
err = NULL,
control = list(link = "identity"),
argGam = NULL,
...
)
## S3 method for class 'caretx'
calibration(
x,
newdata = NULL,
bs = "cr",
k = 20,
qu = 0.5,
form = NULL,
lsig = NULL,
err = NULL,
control = list(link = "identity"),
argGam = NULL,
...
)
x |
a |
bs |
basis function for the smoother, ignored if a formula provided. |
k |
degrees of freedom for the smoother, ignored if a formula provided. |
qu |
quantile or quantiles for the calibration,
see: |
form |
optional GAM formula as specified by
|
lsig |
the value of the log learning rate used to create the
Gibbs posterior, see: |
err |
an upper bound on the error of the estimated quantile curve,
see: |
control |
a list of control parameters passed to
|
argGam |
a list of parameters to be passed to
|
... |
extra arguments passed to |
newdata |
a data frame with the test data.#' |
Currently, only quantile calibration for regression predx
and caretx
objects is implemented. If a vector of quantiles is provided, the optimal
one is choosen based on the minimum RMSE
(more formal criteria are in development).
A list with the predx
object
(.raw stores the uncalibrated predctions, .fitted stores the calibrated
predictions) along with the gamObject named cal_fit
,
the chosen quantile value (qu
) and values of explained deviance (qu_tbl
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.