posteriorBalance: Posterior probability adjustment.

Description Usage Arguments Value See Also

View source: R/my_functions.r

Description

Adjusts the posterior probability of a classifier based on unbalanced datasets. In classification model where the negative data is randomly under-sampled and all the positive data is used, the adjustment factor (beta) is p(s=1|-) = p(+)/p(-). I.e., the probability that a negative datapoint is selected in the classifier. beta ~ N+/N-.

Usage

1
posteriorBalance(probs, beta = NULL, Nplus, Nminus)

Arguments

probs

The original posterior probability.

beta

The adjustment factor.

Nplus

The number of positive examples in the real data. Only used if beta is NULL.

Nminus

The number of negative examples in the real data. Only used if beta is NULL.

Value

The adjusted posterior probability.

See Also

Dal Pozzolo, Andrea, et al. "Calibrating probability with undersampling for unbalanced classification." Computational Intelligence, 2015 IEEE Symposium Series on. IEEE, 2015.


traversc/trqwe documentation built on Dec. 4, 2020, 4:21 a.m.