Description Usage Arguments Value Examples
View source: R/accuracy_score.R
Given a set of predictions from glm_predict
and the correct data,
returns the accuracy of the predictions.
1 | accuracy_score(correct, predictions, normalize = TRUE)
|
correct |
True/correct labels. |
predictions |
Predicted labels. |
normalize |
Normalize the accuracy to the number of samples. default = |
accuracy
(numeric): If normalize==TRUE
, this is the fraction of correctly classified examples. Otherwise, returns the number correct predictions.
1 2 3 | cancer_model <- glm(malignant ~ texture_mean, data=cancer_clean, family="quasibinomial")
cancer_preds <- glm_predict(cancer_model, "malignant")
accuracy <- accuracy_score(cancer_clean[["malignant"]], cancer_preds[[".prediction"]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.