woe_table: Crosstable with woe between a binary outcome and a predictor...

View source: R/woe.R

woe_tableR Documentation

Crosstable with woe between a binary outcome and a predictor variable.


Calculates some summaries and the WoE (Weight of Evidence) between a binary outcome and a given predictor variable. Used to biuld the dictionary.


woe_table(predictor, outcome, Laplace = 1e-06)



A atomic vector, usualy with few distinct values.


The dependent variable. A atomic vector with exactly 2 distinct values.


The pseudocount parameter of the Laplace Smoothing estimator. Default to 1e-6. Value to avoid -Inf/Inf from predictor category with only one outcome class. Set to 0 to allow Inf/-Inf.


a tibble with counts, proportions and woe. Warning: woe can possibly be -Inf. Use 'Laplace' arg to avoid that.


Kullback, S. (1959). Information Theory and Statistics. Wiley, New York.

Hastie, T., Tibshirani, R. and Friedman, J. (1986). Elements of Statistical Learning, Second Edition, Springer, 2009.

Good, I. J. (1985), "Weight of evidence: A brief survey", Bayesian Statistics, 2, pp.249-270.

embed documentation built on July 2, 2022, 5:05 p.m.