I would like to wrap the text in an enumerate environment around a table, this is my actual situation (sorry for including so much code, but I wanted to give a precise idea of the number of lines in the enumerate environment):
\subsection{Given the following data set where “Target 2” represent the class attribute,
compute the naive Bayesian classification for the instance $<L,white>$ and $<XS,?>$.}
\begin{table}[h!t]
\centering
\begin{tabular}{ccc}
\toprule
Size & Color & Target2 \\
\midrule
XS & green & Yes \\
L & green & Yes \\
XS & white & No \\
M & black & No \\
XL & green & Yes \\
XS & white & Yes \\
L & black & No \\
M & green & Yes \\
\bottomrule
\end{tabular}
\end{table}
\begin{enumerate}
\item In this case the experience $E$ is made up of $e_{1} = L$ and $e_{2} = white$,
which in Naive Bayes are to be considered as independent, therefore we have:
\begin{align*}
P(yes|E) &= P(L|yes)\cdot P(white|yes) \cdot P(yes) \\
&= \sfrac{1}{5}\times \sfrac{1}{5} \times \sfrac{5}{8} \\
&= 0.025
\end{align*}
\begin{align*}
P(no|E) &= P(L|no) \cdot P(white|no) \cdot P(no) \\
&= \sfrac{1}{3} \times \sfrac{1}{3} times \sfrac{3}{8} \\
&= 0.041
\end{align*}
Then we normalize:
\begin{align*}
P(yes) &= \frac{0.025}{0.066}
\simeq 0.38
\end{align*}
\begin{align*}
P(no) &= \frac{0.041}{0.066}
\simeq 0.62
\end{align*}
As $P(no) > P(yes)$, we label $<L,white>$ as ``no''.
\item Now we have to classify a sample with a missing value. During the testing phase
we simply omit the attribute\footnote{Classification Other Methods, slide 24}:
\begin{align*}
P(yes|XS) &= P(XS|yes) \cdot P(yes) = \sfrac{2}{5} \times \sfrac{5}{8}
= 0.25
\end{align*}
\begin{align*}
P(no|XS) &= P(XS|no) \cdot P(no)
= \sfrac{1}{3} \times \sfrac{3}{8}
= 0.125
\end{align*}
Let us normalize
\begin{align*}
P(yes) &= \sfrac{0.25}{0.375} \simeq 0.7 \\
P(no) &= \sfrac{0.125}{0.375} \simeq 0.3
\end{align*}
Bottom line this sample is classified as ``yes''.
\end{enumerate}
I have tried using the wrapfig
and the floatftl
package unsuccessfully, the table was
moved to the end of the list in both cases. I have considered using two minipage
environments, but I would like the text to actually wrap around the table.