% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metrics.R
\name{accuracy_mtl}
\alias{accuracy_mtl}
\title{Classification Accuracy for Multi-Task Predictions}
\usage{
accuracy_mtl(true.label.mat, pred.label.mat, threshold = 0)
}
\arguments{
\item{true.label.mat}{A numeric matrix of true responses
(\code{n x numTasks}). \code{NA} cells are ignored.}

\item{pred.label.mat}{A numeric matrix of predictions of the same
dimensions (as produced by \code{\link{predict.orthoMTL}}).}

\item{threshold}{Decision threshold applied to \code{pred.label.mat}.
Default \code{0} matches raw link scores; pass \code{0.5} for
probabilities from \code{predict(..., type = "response")}.}
}
\value{
A single numeric value in \code{[0, 1]} (higher is better).
}
\description{
Pooled fraction of correctly classified non-\code{NA} cells, for
\code{orthoMTL} fits in classification mode (\code{logistic = TRUE}).
A cell is positive when its true label is \code{> 0} and predicted
positive when its score is \code{> 0}. This works for both the
\eqn{\{-1, +1\}} encoding the solver optimises and a \eqn{\{0, 1\}}
encoding, and for raw \code{"link"} scores or \code{"response"}
probabilities (threshold 0.5 corresponds to a link of 0... see note).
}
\examples{
set.seed(1)
Y <- matrix(sample(c(-1, 1), 30, replace = TRUE), 10, 3)
P <- Y * abs(matrix(rnorm(30), 10, 3))   # mostly correct signs
accuracy_mtl(Y, P)
}
\seealso{
\code{\link{auc_mtl}}, \code{\link{cindex_mtl}}
}
