sim_postcode_levels | R Documentation |
Simulate the levels and their sizes in a high-cardinality feature
sim_postcode_levels(nlevels = 100L, seed = 1001)
nlevels |
Number of levels to generate. |
seed |
Random seed. |
A data frame of postal codes and sizes.
The code is derived from the example described in the "rare levels"
vignette in the vtreat
package.
df_levels <- sim_postcode_levels(nlevels = 500, seed = 42)
head(df_levels)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.