Description Usage Arguments Value
Functions to retrieve true positives, true negatives, ...
Structure: Suppose you designed a test to predict if a person lied. Your tibble might look like this:
| | test_result | person_lied | comment | |—|————-|————-|——————-| | 1 | pos | yes | <- true positive | | 2 | pos | no | <- false positive | | 3 | neg | no | <- true negative | | 4 | pos | yes | ... | | 5 | neg | no | ... |
Your predicted condition (pred_cond
) would be test_result
and the
targeted condition (pred_cond_targ
) would be pos
. The actual condition
(act_cond
) would be person_lied
with targeted condition
(act_cond_targ
) yes
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | test_get_true_positives(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE)
test_get_false_positives(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE)
test_get_actual_positives(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE)
test_get_predicted_positives(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE)
test_get_true_negatives(data, pred_cond, act_cond, pred_cond_targ = TRUE,
act_cond_targ = TRUE)
test_get_false_negatives(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE)
test_get_actual_negatives(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE)
test_get_predicted_negatives(data, pred_cond, act_cond,
pred_cond_targ = TRUE, act_cond_targ = TRUE)
|
data |
A tibble holding the data |
pred_cond |
The column holding the predicted conditions / test results. |
act_cond |
The column holding the true conditions. |
pred_cond_targ |
The value that signifies the targeted predicted condition. |
act_cond_targ |
The value that signifies the targeted true condition. |
A tibble containing the true positives / negatives / ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.