| calc_lhat_glm | R Documentation |
Calculates the optimal value of lhat for the prediction-powered confidence interval for GLMs.
calc_lhat_glm(
grads,
grads_hat,
grads_hat_unlabeled,
inv_hessian,
coord = NULL,
clip = FALSE
)
grads |
(matrix): n x p matrix gradient of the loss function with respect to the parameter evaluated at the labeled data. |
grads_hat |
(matrix): n x p matrix gradient of the loss function with respect to the model parameter evaluated using predictions on the labeled data. |
grads_hat_unlabeled |
(matrix): N x p matrix gradient of the loss function with respect to the parameter evaluated using predictions on the unlabeled data. |
inv_hessian |
(matrix): p x p matrix inverse of the Hessian of the loss function with respect to the parameter. |
coord |
(int, optional): Coordinate for which to optimize |
clip |
(boolean, optional): Whether to clip the value of lhat to be
non-negative. Defaults to |
(float): Optimal value of lhat in [0,1].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.