sim_postcode_levels {oneclust} | R Documentation |
Simulate the levels and their sizes in a high-cardinality feature
Description
Simulate the levels and their sizes in a high-cardinality feature
Usage
sim_postcode_levels(nlevels = 100L, seed = 1001)
Arguments
nlevels |
Number of levels to generate. |
seed |
Random seed. |
Value
A data frame of postal codes and sizes.
Note
The code is derived from the example described in the "rare levels"
vignette in the vtreat
package.
Examples
df_levels <- sim_postcode_levels(nlevels = 500, seed = 42)
head(df_levels)
[Package oneclust version 0.3.0 Index]