Description Usage Arguments Value Examples
View source: R/precision_score.R
Precision Score
1 | precision_score(correct, predictions, pos_class = 1, neg_class = 0)
|
correct |
True/correct labels. |
predictions |
Predicted labels. |
pos_class |
Positive class label. Like the y value in |
neg_class |
Negative class label. Like the y value in |
precision
(numeric): The precision (true positives / true positives + false positives) of the predictions
1 2 3 | cancer_model <- glm(malignant ~ texture_mean, data=cancer_clean, family="quasibinomial")
cancer_preds <- glm_predict(cancer_model, "malignant")
precision <- precision_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.