Learn R Programming

bnlearn (version 3.1)

discretize: Discretize data to learn discrete Bayesian networks

Description

Discretize data to learn discrete Bayesian networks.

Usage

discretize(x, method, breaks = 3, ..., debug = FALSE)

Arguments

x
a data frame containing with numeric and factor columns.
method
a character string, either interval for interval discretization, quantile for quantile discretization (the default) or hartemink for Hartemink's pairwise mutual information met
breaks
if method is set to hartemink, an integer number, the number of levels the variables are to be discretized into. Otherwise, a vector of integer numbers, one for each column of the data set, specifying the number of le
...
additional tuning parameters, see below.
debug
a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent.

Value

  • discretize returns a data frame with the same structure (number of columns, column names, etc.) as x, containing the discretized variables.

References

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.

Examples

Run this code
data(gaussian.test)
d = discretize(gaussian.test, method = 'hartemink', breaks = 4, ibreaks = 20)
plot(hc(d))

Run the code above in your browser using DataLab