
\begin{tikzpicture}
\def \h{4}
\node () at (-1.5,-1) {$S=\bigcirc$};
    \node[rectangle,draw=,anchor=north] (G0) at (0,0) {$\begin{matrix}0&0\\0&0\\1&1\\&1\\2&2\\&2\end{matrix}$};
\node () at (\h-1.5,-1) {$S=\bigtriangleup$};
    \node[rectangle,draw=,anchor=north] (G1) at (\h,0){$\begin{matrix}1&1\end{matrix}$};
\node () at (2*\h-1.5,-1) {$S=\times$};
    \node[rectangle,draw=,anchor=north] (G2) at (2*\h,0){$\begin{matrix}2&2\end{matrix}$};
        \pause
        \node (L0) at (0,-4.5) {$
        \begin{matrix}
            P(Y=\emph{0}|S=\bigcirc) = \frac{4}{10}\\[6pt]
            P(Y=\emph{1}|S=\bigcirc) = \frac{3}{10}\\[6pt]
            P(Y=\emph{2}|S=\bigcirc) = \frac{3}{10}
        \end{matrix}
        $};
        \node (L1) at (\h,-4.5) {$
        \begin{matrix}
            P(Y=\emph{0}|S=\bigtriangleup) = 0\\[6pt]
            P(Y=\emph{1}|S=\bigtriangleup) = 1\\[6pt]
            P(Y=\emph{2}|S=\bigtriangleup) = 0
        \end{matrix}
        $};
        \node (L2) at (2*\h,-4.5) {$
        \begin{matrix}
            P(Y=\emph{0}|S=\times) = 0\\[6pt]
            P(Y=\emph{1}|S=\times) = 0\\[6pt]
            P(Y=\emph{2}|S=\times) =1
        \end{matrix}
        $};

\draw[->] (G0) to (L0);
\draw[->] (G1) to (L1);
\draw[->] (G2) to (L2);

    \def \s{0.6}
    \def \o{0}
\draw (-2,-3.5) rectangle (1.9+2*\h,-4.1);
    \node (x0) at (-2-\o,-3.5-\o) {};
\draw (-2,-3.6-\s) rectangle (1.9+2*\h,-4.2-\s);
    \node (x1) at (-2-\o,-3.6-\s-\o) {};
\draw (-2,-3.7-2*\s) rectangle (1.9+2*\h,-4.3-2*\s);
    \node (x2) at (-2-\o,-3.7-2*\s-\o) {};

    \pause
    \draw[blue] (-2,-3.5) rectangle (2,-4.1);
    \draw[blue] (-2+\h,-3.6-\s) rectangle (2+\h,-4.2-\s);
    \draw[blue] (-2+2*\h,-3.7-2*\s) rectangle (1.9+2*\h,-4.3-2*\s);
    \pause

    \node[anchor=west] () at (-2,-6) {$a(\emph{2}) = \times$};
    \node[anchor=west] () at (-2,-6-\s) {$a(\emph{1}) = \bigtriangleup$};
    \node[anchor=west] () at (-2,-6-2*\s) {$a(\emph{0}) = \bigcirc$};

    \node[anchor=west] (f2) at (-2.1,-6) {};
    \node[anchor=west] (f1) at (-2.1,-6-\s) {};
    \node[anchor=west] (f0) at (-2.1,-6-2*\s) {};


    \draw[->] (x0) to[bend right] (f0);
    \draw[->] (x1) to[bend right] (f1);
    \draw[->] (x2) to[bend right] (f2);

    \pause

    \node[anchor=west] () at (1,-6) {Exactitude $=\frac{8}{14}(\approx 0.57)$};
    \node[anchor=west] () at (1,-6.5) {$A(\bigcirc)=\frac{4}{10}$~$A(\bigtriangleup)=1$~$A(\times)=1$};
    \node[anchor=west]() at (1,-7) {Exactitude équilibré $=\frac{24}{30}=0.8$};
\end{tikzpicture}
