\HeaderA{discretize}{Unsupervized Data Discretization}{discretize}
\keyword{misc}{discretize}
\begin{Description}\relax
\code{discretize} discretizes \code{data} using the equal frequencies or equal width binning algorithm.
\end{Description}
\begin{Usage}
\begin{verbatim}discretize( data,disc="equalfreq",nbins=sqrt(nrow(data)) )\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] A data.frame containing data to be discretized. The columns contains variables and the rows samples.
\item[\code{disc}] The name of the discretization method to be used :"equalfreq" or "equalwidth" (default : "equalfreq") - see references.
\item[\code{nbins}] Integer specifying the number of bins to be used for the discretization. By default the number of bins is set to 
\eqn{\sqrt{N}}{sqrt(N)} where N is the number of samples.
\end{ldescription}
\end{Arguments}
\begin{Value}
\code{discretize} returns the discretized dataset.
\end{Value}
\begin{Author}\relax
Patrick E. Meyer, Frederic Lafitte, Gianluca Bontempi
\end{Author}
\begin{References}\relax
Supervised and unsupervised discretization of continuous features. J.Dougherty, R. Kohavi, M. Sahami.
ICML, 1995.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{build.mim}{build.mim}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(syn.data)
ew.data <- discretize(syn.data,"equalwidth")
ef.data <- discretize(syn.data,"equalfreq")
\end{ExampleCode}
\end{Examples}

