% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_correlation}
\alias{plot_correlation}
\title{Task Correlation Map for orthoMTL}
\usage{
plot_correlation(x, midpoint = 0.5, limits = c(0, 1))
}
\arguments{
\item{x}{Either a fitted \code{"orthoMTL"} object or a numeric
coefficient matrix with dimensions \code{p x numTasks}.}

\item{midpoint}{Midpoint for the colour scale. Default: \code{0.5}.}

\item{limits}{Numeric vector of length 2 for the colour scale limits.
Default: \code{c(0, 1)}.}
}
\value{
A \code{ggplot2} object.
}
\description{
Displays pairwise distances between task coefficient vectors as a
heatmap. Distance is computed as \code{1 - cosine_similarity}.
Values near 0 indicate similar coefficient profiles; values near 1
indicate orthogonal profiles.
}
\examples{
set.seed(42)
n <- 100; p <- 10; n_tasks <- 4
X <- matrix(rnorm(n * p), n, p)
colnames(X) <- paste0("V", seq_len(p))
Y <- X \%*\% matrix(rnorm(p * n_tasks), p) + matrix(rnorm(n * n_tasks), n) * 0.1
colnames(Y) <- c("T1", "T2", "T3", "T4")
K <- matrix(1, n_tasks, n_tasks); diag(K) <- 0.5
fit <- orthoMTL(X, Y, lambda = 1e-3, K = K)

plot_correlation(fit)
}
\seealso{
\code{\link{plot_heatmap}}
}
