Preprocessing & clustering
Advanced settings
Distance weight parameter (γ)
Gamma (γ) controls the relative weight of categorical vs. continuous variables in distance calculations. Auto-mode uses the average standard deviation of the scaled continuous features, measured in the same space the distance is, so with z-scores it lands near 1 (typically works well). With no scaling or 0–100 scaling, the distance squares numeric gaps on a much larger scale than the auto value, so category mismatches end up nearly irrelevant: standardize first, or set γ by hand. Increase γ to give categorical variables more influence; decrease to prioritize continuous variables.
Auto: γ = (will be calculated after data load)
Reproducibility
Additional info & guidance
Start with k=3–4 and run diagnostics for k=2–8. Look for an elbow in the cost plot and high silhouette values (0.5 or more for reasonable separation; 0.25–0.5 is weak) to identify well-separated clusters. Because k-prototypes uses multiple random initializations, results are generally stable but may vary slightly between runs.
Standardization is recommended when continuous variables have very different scales (e.g., age 0–100 vs. spend $0–$10,000). Note: standardization affects auto-calculated gamma by changing variance structure. If clusters seem overly driven by one variable type, adjust gamma manually.