2

I would like to make a confusion matrix that looks like the one on the picture. How can I achive this? Thanks enter image description here

2

Quite hard coded, but you may start with this:

% arara: pdflatex

\documentclass{article}
\usepackage{blkarray}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{mathtools}

\begin{document}    
\[
\renewcommand{\arraystretch}{1.6}
\begin{blockarray}{c@{}ccc}
&&\BAmulticolumn{2}{c}{\text{observed}}\\[-2\jot]
&& 0 & 1 \\
\begin{block}{c@{\hspace{.6em}}c[cc]}
\multirow{2}{*}{\rotatebox[origin=c]{90}{predicted}} & 0 & a=1 & b=2\\
& 1 & c=3 & d=4 \\
\end{block}
\end{blockarray}
\]
\end{document}

enter image description here

  • @OlgaLyashevska Glad to hear that. – LaRiFaRi Jul 13 '15 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.