acc defines overall accuracy
as the probability of correspondence between a positive decision
and true condition (i.e., the proportion of correct classification
decisions or of dec_cor cases).
Details
Importantly, correct decisions dec_cor
are not necessarily positive decisions dec_pos.
Understanding or obtaining the accuracy metric acc:
Definition:
accis the (non-conditional) probability:acc = p(dec_cor) = dec_cor/Nor the base rate (or baseline probability) of a decision being correct, but not necessarily positive.
accvalues range from 0 (no correct decision/prediction) to 1 (perfect decision/prediction).Computation:
acccan be computed in several ways:(a) from
prob:acc = (prev x sens) + [(1 - prev) x spec](b) from
freq:acc = dec_cor/N = (hi + cr)/(hi + mi + fa + cr)(c) as complement of the error rate
err:acc = 1 - errWhen frequencies in
freqare not rounded, (b) coincides with (a) and (c).Perspective:
accclassifies a population ofNindividuals by accuracy/correspondence (acc = dec_cor/N).accis the "by accuracy" or "by correspondence" counterpart toprev(which adopts a "by condition" perspective) and toppod(which adopts a "by decision" perspective).Alternative names: base rate of correct decisions, non-erroneous cases
In terms of frequencies,
accis the ratio ofdec_cor(i.e.,hi + cr) divided byN(i.e.,hi + mi+fa + cr):acc = dec_cor/N = (hi + cr)/(hi + mi + fa + cr)Dependencies:
accis a feature of both the environment (true condition) and of the decision process or diagnostic procedure. It reflects the correspondence of decisions to conditions.
See accu for other accuracy metrics
and several possible interpretations of accuracy.
References
Consult Wikipedia:Accuracy_and_precision for additional information.
See also
comp_acc computes accuracy from probabilities;
accu lists all accuracy metrics;
comp_accu_prob computes exact accuracy metrics from probabilities;
comp_accu_freq computes accuracy metrics from frequencies;
comp_sens and comp_PPV compute related probabilities;
is_extreme_prob_set verifies extreme cases;
comp_complement computes a probability's complement;
is_complement verifies probability complements;
comp_prob computes current probability information;
prob contains current probability information;
is_prob verifies probabilities.
Other probabilities:
FDR,
FOR,
NPV,
PPV,
err,
fart,
mirt,
ppod,
prev,
sens,
spec
Other metrics:
accu,
comp_acc(),
comp_accu_freq(),
comp_accu_prob(),
comp_err(),
err
Examples
acc <- .50 # sets a rate of correct decisions of 50%
acc <- 50/100 # (dec_cor) for 50 out of 100 individuals
is_prob(acc) # TRUE
#> [1] TRUE
