k_clusters {citrus} | R Documentation |
k-clusters model
Description
k-clusters method for segmentation. It can handle segmentation for both numerical data types only, by using k-means algorithm, and mixed data types (numerical and categorical) by using k-prototypes algorithm
Usage
k_clusters(data, hyperparameters, verbose = TRUE)
Arguments
data |
data.frame, the data to segment |
hyperparameters |
list of hyperparameters to pass. They include
centers: number of clusters or a set of initial (distinct) cluster centers, or 'auto'. When 'auto' is chosen, the number of clusters is optimised; |
verbose |
logical whether information about the clustering procedure should be given. |
Value
A class called "k-clusters" containing a list of the model definition, the hyper-parameters, a table of outliers, the elbow plot (ggplot object) used to determine the optimal no. of clusters, and a lookup table containing segment predictions for customers.