% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_k_elbow}
\alias{plot_k_elbow}
\title{Plot elbow curve for k selection}
\usage{
plot_k_elbow(k_results)
}
\arguments{
\item{k_results}{A list as returned by \code{\link[=find_optimal_k]{find_optimal_k()}}, containing
\verb{$results} (data.frame with \code{k} and \code{avg_mi} columns) and optionally
\verb{$best_k}.}
}
\value{
Invisibly returns \code{k_results}.
}
\description{
Takes the list returned by \code{\link[=find_optimal_k]{find_optimal_k()}} and plots the elbow curve
(k vs average MI). When \verb{$best_k} is present, marks the elbow point with
a distinct symbol and label.
}
\examples{
k_res <- list(
  results = data.frame(k = c(3, 5, 7, 10), avg_mi = c(0.5, 0.45, 0.42, 0.41)),
  best_k = 5
)
plot_k_elbow(k_res)

}
