% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/make_partitions.R
\name{get_centers}
\alias{get_centers}
\title{Get Centers for Partitioning}
\usage{
get_centers(
  data,
  K,
  cluster_args,
  cluster_on_indicators,
  data_already_processed = FALSE
)
}
\arguments{
\item{data}{Matrix of predictor data (already processed: binary/excluded
columns zeroed out by the caller when \code{data_already_processed = TRUE})}

\item{K}{Number of partitions minus 1 (\eqn{K})}

\item{cluster_args}{List with custom centers and kmeans args}

\item{cluster_on_indicators}{Include binary predictors in clustering}

\item{data_already_processed}{Logical; when TRUE the caller has already
zeroed out binary / excluded columns, so \code{get_centers} skips its
own binary-zeroing step.  Defaults to FALSE for backward compatibility.}
}
\value{
Matrix of cluster centers
}
\description{
Get Centers for Partitioning
}
\details{
Returns partition centers via:

1. Custom supplied centers if provided as a valid \eqn{(K+1) \times q} matrix

2. kmeans clustering on all non-spline variables if \code{cluster_on_indicators=TRUE}
   or if \code{data_already_processed=TRUE}

3. kmeans clustering excluding binary variables if \code{cluster_on_indicators=FALSE}
   and \code{data_already_processed=FALSE}
}
\keyword{internal}
