I would like to add a label that is diagonal to the following box, underneath the n', such that it is horizontally just below the box. Basically, I would like to "subtract" the difference between the content in the two cells. I'd like to add a label that says "Diff" just off the bottom left corner and then place the difference just below (p, n') box, outside of it.
For a picture of the box, see an earlier questions: making a box in beamer -- center aligning the title
Thank you very much for your help!
\documentclass[professionalfont, fleqn]{beamer}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning,fit,shapes.misc}
\begin{document}
\begin{frame}
\centering
\only<1>{%
\begin{tikzpicture}[
box/.style = {draw,rectangle,minimum size=1.0cm,text
width=1cm,align=center}
]
\matrix (conmat) [row sep=0cm,column sep=0cm,ampersand
replacement=\&] {
\node (tpos) [box,label=left:\( \mathbf{p'} \),label=above:\(
\mathbf{p} \),] {};
\& \node (fneg) [box,label=above:\textbf{n},] {$\checkmark$}; \\
\node (fpos) [box,label=left:\( \mathbf{n'} \),] {$\checkmark$};
\& \node (tneg) [box] {$\checkmark$}; \\
};
\node [left=.05cm of conmat,text width=1.5cm,align=center]
{\textbf{actual \\ value}};
\node [above=.05cm of conmat] {\textbf{prediction}};
\end{tikzpicture}%
}
\end{frame}
\end{document}
