Description Usage Arguments Value Note Author(s) References Examples
Discretize data to learn discrete Bayesian networks.
1 | discretize(x, method, breaks = 3, ..., debug = FALSE)
|
x |
a data frame containing either numeric or factor columns. |
method |
a character string, either |
breaks |
if |
... |
additional tuning parameters, see below. |
debug |
a boolean value. If |
discretize
returns a data frame with the same structure (number
of columns, column names, etc.) as x
, containing the discretized
variables.
Hartemink's algorithm has been designed to deal with sets of homogeneous,
continuous variables; this is the reason why they are initially transformed
into discrete variables, all with the same number of levels (given by the
ibreaks
argument). Which of the other algorithms is used is specified
by the idisc
argument (quantile
is the default). The
implementation in bnlearn
also handles sets of discrete variables
with the same number of levels, which are treated as adjacent interval
identifiers. This allows the user to perform the initial discretization
with the algorithm of his choice, as long as all variables have the same
number of levels in the end.
Marco Scutari
Hartemink A (2001). Principled Computational Methods for the Validation and Discovery of Genetic Regulatory Networks. Ph.D. thesis, School of Electrical Engineering and Computer Science, Massachusetts Institute of Technology.
1 2 3 | data(gaussian.test)
d = discretize(gaussian.test, method = 'hartemink', breaks = 4, ibreaks = 20)
plot(hc(d))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.