% PSTricks: Graphical Model: Figure 8.8b Naive Bayes Classifier
\documentclass{article}
\usepackage{com.braju.graphicalmodels}
\usepackage{amsmath}
\catcode`\@=11%

\pagestyle{empty}

\begin{document}
\TeXtoEPS

\LARGE
\psset{unit=10mm,arrowscale=1.5,linewidth=1.5pt}
\begin{pspicture}(0,0)(6,12)%\showgrid
  \SpecialCoor

  \rput(-0.5,0){\GM@plate{5}{6}{$D$}}
  \rput(0.3,1){\GM@plate{3.4}{2}{$C$}}
  \rput(0.3,4){\GM@plate{3.4}{3.8}{$N$}}

  \rput(2,2.3){\GM@node[observed=false]{theta}} \GM@label[angle=-90]{theta}{$\theta_{jc}$}
  \rput(2,5.3){\GM@node[observed=false]{X}} \GM@label[angle=180]{X}{$X_{ij}$}
  \rput(2,6.9){\GM@node[observed=false]{Y}} \GM@label[angle=180]{Y}{$Y_{i}$}
  \rput(2,8.6){\GM@node[observed=false]{pi}} \GM@label[angle=90]{pi}{$\boldsymbol{\pi}$}

  \ncline[arrows=->]{pi}{Y}
  \ncline[arrows=->]{Y}{X}
  \ncline[arrows=->]{theta}{X}




\end{pspicture}

\endTeXtoEPS
\end{document}
