| Title: | R binding of blip (Bayesian network Learning Improved Project) |
|---|---|
| Description: | Offers many approaches to score-based structure learning of Bayesian networks. |
| Authors: | Mauro Scanagatta [aut, cre] |
| Maintainer: | Mauro Scanagatta <[email protected]> |
| License: | GPLv3 |
| Version: | 1.1 |
| Built: | 2026-05-27 06:34:08 UTC |
| Source: | https://github.com/mauro-idsia/r.blip |
Used by most of the functions in the r.blip binding, provides access to the included jar file.
blip(args)blip(args)
args |
Vector of arguments to be passed to the jar |
The arguments vector is formatted in a system call to the included jar file. Should not be called directly by the user, unless you know exactly what you are doing. In that case, call directly the blip jar.
Fully learns a Bayesian networks.
blip.learn(dat, scorer.method = "is", solver.method = "winasobs", indeg = 6, time = 3600, allocated = 80, scorefunction = "bic", alpha = 1, cores = 1, verbose = 0)blip.learn(dat, scorer.method = "is", solver.method = "winasobs", indeg = 6, time = 3600, allocated = 80, scorefunction = "bic", alpha = 1, cores = 1, verbose = 0)
dat |
dataframe from which to learn the parent sets.(required) |
scorer.method |
Method to be used for scoring the parent sets. Possible values: "is" (independence selection), "sq" (sequential selection). (default: is) |
solver.method |
Method to be used for structure exploration. Possible values: "winasobs", "winobs", "asobs", "obs". (default: winasobs) |
indeg |
Maximum number of parents (default: 6) |
time |
Execution time (default: 3600) |
allocated |
Percentage of the total execution time dedicated to parent set exploration (default: 80) |
scorefunction |
Chosen score function. Possible choices: BIC, BDeu (default: bic) |
alpha |
(if BDeu is chosen) equivalent sample size parameter (default: 1.0) |
cores |
Number of machine cores to use. If 0, all are used. (default: 1) |
verbose |
Verbose level (default: 0) |
The input data is required to be complete and discrete. Accordingly missing values in the input data.frame will be ignored, and all numeric values will be converted to integers.
The learned Bayesian network in the bnlearn format.
bn <- blip.learn(read.table('data/child-5000.dat', sep = ' '), time = 10)bn <- blip.learn(read.table('data/child-5000.dat', sep = ' '), time = 10)
Fully learns a Bayesian networks with a treewidth bound.
blip.learn.tw(dat, scorer.method = "is", solver.method = "kmax", treewidth = 4, time = 3600, allocated = 80, scorefunction = "bic", alpha = 1, cores = 1, verbose = 0)blip.learn.tw(dat, scorer.method = "is", solver.method = "kmax", treewidth = 4, time = 3600, allocated = 80, scorefunction = "bic", alpha = 1, cores = 1, verbose = 0)
dat |
dataframe from which to learn the parent sets.(required) |
scorer.method |
Method to be used for scoring the parent sets. Possible values: "is" (independence selection), "sq" (sequential selection). (default: is) |
solver.method |
Method to be used for bounded-treewidth structure exploration. Possible values: "kmax", "kg", "ka". (default: kmax) |
treewidth |
Maximum treewidth (default: 4) |
time |
Execution time (default: 3600) |
allocated |
Percentage of the total execution time dedicated to parent set exploration (default: 80) |
scorefunction |
Chosen score function. Possible choices: BIC, BDeu (default: bic) |
alpha |
(if BDeu is chosen) equivalent sample size parameter (default: 1.0) |
cores |
Number of machine cores to use. If 0, all are used. (default: 1) |
verbose |
Verbose level (default: 0) |
The input data is required to be complete and discrete. Accordingly missing values in the input data.frame will be ignored, and all numeric values will be converted to integers.
The learned Bayesian network in the bnlearn format.
Generates the cache of parent sets from a given data source
blip.scorer(dat, method = "is", indeg = 6, time = 3600, scorefunction = "bic", alpha = 1, cores = 1, verbose = 1)blip.scorer(dat, method = "is", indeg = 6, time = 3600, scorefunction = "bic", alpha = 1, cores = 1, verbose = 1)
dat |
dataframe from which to learn the parent sets.(required) |
method |
Method to be used. Possible values: "is" (independence selection), "sq" (sequential selection). (default: is) |
indeg |
Maximum number of parents (default: 6) |
time |
Maximum Execution time (default: 3600) |
scorefunction |
Chosen score function. Possible choices: BIC, BDeu (default: bic) |
alpha |
(if BDeu is chosen) equivalent sample size parameter (default: 1.0) |
cores |
Number of machine cores to use. If 0, all are used. (default: 1) |
verbose |
Verbose level (default: 0) |
Usually the first step in the learning of a Bayesian network.
The input data is required to be complete and discrete. Accordingly missing values in the input data.frame will be ignored, and all numeric values will be converted to integers.
Cache of parent sets
Find an optimal structure from the cache of parent sets
blip.solver(jkl, method = "winasobs", time = 3600, cores = 1, verbose = 1)blip.solver(jkl, method = "winasobs", time = 3600, cores = 1, verbose = 1)
jkl |
cache of pre-computed parent sets.(required) |
method |
Method to be used. Possible values: "winasobs", "winobs", "asobs", "obs". (default: winasobs) |
time |
Maximum Execution time (default: 3600) |
cores |
Number of machine cores to use. If 0, all are used. (default: 1) |
verbose |
Verbose level (default: 0) |
The input data is required to be complete and discrete. Accordingly missing values in the input data.frame will be ignored, and all numeric values will be converted to integers.
Structure
Find an optimal structure from the cache of parent sets
blip.solver.tw(jkl, method = "kmax", treewidth = 4, time = 3600, cores = 1, verbose = 1)blip.solver.tw(jkl, method = "kmax", treewidth = 4, time = 3600, cores = 1, verbose = 1)
jkl |
cache of pre-computed parent sets.(required) |
method |
Method to be used. Possible values: "kmax", "kg", "ka". (default: kmax) |
treewidth |
Maximum treewidth (default: 4) |
time |
Maximum Execution time (default: 3600) |
cores |
Number of machine cores to use. If 0, all are used. (default: 1) |
verbose |
Verbose level (default: 0) |
The input data is required to be complete and discrete. Accordingly missing values in the input data.frame will be ignored, and all numeric values will be converted to integers.
Structure
Read a Jkl file (parent sets cache)
read.jkl(path, data)read.jkl(path, data)
Read a res file for bnlearn loading
read.str(path, data)read.str(path, data)
Write a Jkl file (parent sets cache)
write.jkl(path, jkl, data)write.jkl(path, jkl, data)