I am trying to create a decision tree and I am having trouble trying to colour separately the terminal leaves. The current code I have looks like (ignore the table):
However, I would like to colour the terminal leaves separately, but not sure how to do so since the following line leaf/.style={basic, rounded corners=6pt, thin,align=center, fill=green, text width=1cm}] which corresponds to the leaf only takes one colour value. How can I create a similar decision tree to the one below?
Code:
\documentclass[]{article}
\usepackage{float}
\usepackage{subcaption}
%\usepackage{subfig}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning,shadows,trees,patterns}
\definecolor{blue1}{HTML}{0081FF}
\definecolor{grey1}{HTML}{B0B0B0}
\begin{document}
\begin{figure}[]
\centering
\subfloat[Oblivious Decision Tree]{
\resizebox{0.5\textwidth}{!}{
\begin{tikzpicture}[->,>=stealth',
level/.style={sibling distance = 5cm/#1, level distance = 2cm},
basic/.style={draw, text width=2cm, drop shadow, font=\sffamily, rectangle},
split/.style={basic, rounded corners=2pt, thin, align=center, fill=blue1},
leaf/.style={basic, rounded corners=6pt, thin,align=center, fill=green, text width=1cm}]
\node [split] {$x_1<0.75$}
child{ node [split] {$x_2<1.25$}
child{ node [leaf] {$\omega_{00}$} edge from parent node[above left] {$no$}}
child{ node [split] {$x_1 < 1.78$}
child{ node [leaf] {$\omega_{99}$} edge from parent node[above left] {$no$}}
child{ node [leaf] {$\omega_{87}$} edge from parent node[above right] {$yes$}}
}
%child{ node [leaf] {$\omega_{01}$} edge from parent node[above right] {$yes$}}
edge from parent node[above left] {$no$}}
child{ node [split] {$x_2<1.25$}
child{ node [leaf] {$\omega_{10}$} edge from parent node[above left] {$no$}}
child{ node [leaf] {$\omega_{11}$} edge from parent node[above right] {$yes$}}
edge from parent node[above right] {$yes$}
};
\end{tikzpicture}
}
}
\subfloat[Oblivious Decision Tree]{
\begin{tabular}{llll}
\hline
(x_1<0.75) & (x_2<1.25) & q & w \
\hline
false & false & 00b & ( w_{00} ) \
false & true & 01b & ( w_{01} ) \
true & false & 10b & ( w_{10} ) \
true & true & 11b & ( w_{11} ) \
\hline
\end{tabular}
}
\caption{}
\label{fig:decision-tree}
\end{figure}
\end{document}


