Description Usage Arguments Details Value Examples
binarize
returns the binary data coverted from data in normal (numeric and categorical) format.
1 2 3 4 5 6 7 |
data |
A |
n_bins |
The number of bins to for converting continuous (numeric features) into discrete features (bins) |
thresh_infreq |
The threshold for converting categorical (character or factor features) into an "Other" Category. |
name_infreq |
The name for infrequently appearing categories to be lumped into. Set to "-OTHER" by default. |
one_hot |
If set to |
The binned format helps correlation analysis to identify non-linear trends between a predictor (binned values) and a response (the target)
The binarize()
function takes data in a "normal" format and converts to a binary format that is useful as a preparation
step before using correlate()
:
Numeric Features:
The "Normal Data" format has numeric features that are continuous values in numeric format (double
or integer
).
The binarize()
function converts these to bins (categories) and then discretizes the bins using a one-hot encoding process.
Categorical Features:
The "Normal Data" format has categorical features that are character
or factor
format.
The binarize()
function converts these to binary features using a one-hot encoding process.
A tbl
1 2 3 4 5 6 | library(dplyr)
library(correlationfunnel)
marketing_campaign_tbl %>%
select(-ID) %>%
binarize()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.