R/k_means_clustMixType.R

Defines functions axe_fitted.kproto axe_data.kproto

#' K-means via clustMixType
#'
#' [k_means()] creates K-prototypes model. A K-prototypes is the middle ground
#' between a K-means and K-modes model, in the sense that it can be used with
#' data that contains both numeric and categorical predictors.
#'
#' Both numeric and categorical predictors are requires for this engine.
#'
#' @includeRmd man/rmd/k_means_clustMixType.md details
#'
#' @name details_k_means_clustMixType
#' @keywords internal
NULL

# See inst/README-DOCS.md for a description of how these files are processed

# @export - onLoad
axe_data.kproto <- function(x, verbose = FALSE, ...) {
  attr(x, "training_data") <- NULL
  add_butcher_class(x)
}

# @export - onLoad
axe_fitted.kproto <- function(x, verbose = FALSE, ...) {
  x$cluster <- integer(0)
  add_butcher_class(x)
}

Try the tidyclust package in your browser

Any scripts or data that you put into this service are public.

tidyclust documentation built on June 20, 2026, 9:08 a.m.