\HeaderA{build.mim}{Build Mutual Information Matrix}{build.mim}
\keyword{misc}{build.mim}
\begin{Description}\relax
\code{build.mim} takes the dataset as input and computes the 
mutual information beetween all pair of variables according 
to the mutual inforamtion estimator \code{estimator}. 
The results are saved in the mutual information matrix (MIM), a square 
matrix whose (i,j) element is the mutual information between variables
\eqn{X_i}{Xi} and \eqn{X_j}{Xj}.
\end{Description}
\begin{Usage}
\begin{verbatim}build.mim(data, estimator="mi.empirical")\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] data.frame containing gene expression data or any dataset where columns contain variables/features and rows contain outcomes/samples.
\item[\code{estimator}] The name of the mutual information estimator. The package implements four estimators : 
"mi.empirical", "mi.mm", "mi.shrink", "mi.sg" (default:"mi.empirical") - see details. 
These estimators require discrete data values - see \code{\LinkA{discretize}{discretize}}.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\item "mi.empirical" : This estimator computes the entropy of the empirical probability distribution.
\item "mi.mm" : This is the Miller-Madow asymptotic bias corrected empirical estimator.
\item "mi.shrink" : This is a shrinkage estimate of the entropy of a Dirichlet probability distribution.
\item "mi.sg" : This is the Schurmann-Grassberger estimate of the entropy of a Dirichlet probability distribution.
\end{Details}
\begin{Value}
\code{build.mim} returns the mutual information matrix.
\end{Value}
\begin{Author}\relax
Patrick E. Meyer, Frederic Lafitte, Gianluca Bontempi
\end{Author}
\begin{References}\relax
Patrick E. Meyer, Kevin Kontos, Frederic Lafitte, and Gianluca Bontempi.
Information-theoretic inference of large transcriptional regulatory
networks. EURASIP Journal on Bioinformatics and Systems Biology,
2007.

J. Beirlant, E. J. Dudewica, L. Gyofi, and E. van der Meulen. Nonparametric 
entropy estimation : An overview. Journal of Statistics, 1997.

Jean Hausser. Improving entropy estimation and the inference of genetic regulatory networks.
Master thesis of the National Institute of Applied Sciences of Lyon, 2006.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{clr}{clr}},   \code{\LinkA{aracne}{aracne}},   \code{\LinkA{mrnet}{mrnet}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  data(syn.data)
  #mutual information estimator
  estimator="mi.empirical"
  #number of bins used to discretize
  nb.bins = sqrt(nrow(syn.data))
  mim <- build.mim(discretize(syn.data,nbins=nb.bins),estimator)
\end{ExampleCode}
\end{Examples}

