Description Usage Arguments Value
Output a data.table that contains single column mean target by column value
1 2 3 4 5 6 7 | .calculate_single_colum_mean(
mean_target_colname,
target_colname,
data,
min_samples_leaf = 0,
smoothing = 1
)
|
mean_target_colname |
single column name that needs mean target encoding |
target_colname |
target column name, should be numeric |
data |
dataset used to calculate mean target, usually is the training dataset |
min_samples_leaf |
minimum quantity per column value we consider needs to be calculate mean. below two settings introduced here https://www.kaggle.com/ogrellier/python-target-encoding-for-categorical-features |
smoothing |
used to adjust column value mean target from grand target value, default value 1 is to ignore grand target value |
a data.table contains mean target per column value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.