View source: R/BinomialModel.R
BinomialAUC | R Documentation |
This function computes the AUC for a binomial model's predictions on a given dataset. It uses the specified regularization strengths to generate predictions, which are then evaluated against actual outcomes to compute the AUC using the ROCR package. This function is typically used to assess model performance in classification tasks.
BinomialAUC(model, newx, s, acture.y)
model |
A model object fitted using a binomial distribution, from which predictions will be generated. |
newx |
A matrix or data frame of new data on which to make predictions. This should correspond to the predictors used in fitting the model. |
s |
A character vector indicating the specific regularization strengths ('lambda.min' or 'lambda.1se') at which predictions should be evaluated. |
acture.y |
A vector containing the actual binary outcomes associated with 'newx'. |
A numeric value representing the AUC for the model's predictions against actual outcomes.
# Assuming 'model', 'newx', and 'actual.y' are predefined:
auc_value <- BinomialAUC(model = fitted_model, newx = test_data, s = "lambda.min", acture.y = test_outcomes)
print(auc_value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.