| tl_stratified_models | R Documentation |
Create cluster-specific supervised models for heterogeneous data
tl_stratified_models(
data,
formula,
cluster_method = "kmeans",
k = 3,
supervised_method = "linear",
...
)
data |
A data frame |
formula |
Model formula |
cluster_method |
Clustering method |
k |
Number of clusters |
supervised_method |
Supervised learning method |
... |
Additional arguments |
A list of models (one per cluster) plus cluster assignments
models <- tl_stratified_models(mtcars, mpg ~ ., cluster_method = "kmeans",
k = 3, supervised_method = "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.