compute_probability_ratio: Compute probability ratio
Description
Probability ratio is an aggregation function that can be used for
build_target_encoding. Probability ratio is the P(most freq element) / (1 - P(most frq element)).
Usage
compute_probability_ratio(x)
Value
P(most freq element) / (1 - P(most frq element))
Arguments
x
A list of categorical elements
Details
To be more generic, the library compute P(most freq element) inplace of traditional formula P(1)/P(0)