boot.rsmax2: General 2-Phase Restricted Maximization Algorithm (rsmax2)...

Description Usage Arguments Examples

View source: R/algorithms.R

Description

This function allows you to learn a directed graph from a dataset using the General 2-Phase Restricted Maximization algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
boot.rsmax2(
  df,
  whitelist = NULL,
  blacklist = NULL,
  restrict = c("pc.stable", "gs", "iamb", "fast.iamb", "inter.iamb", "iamb.fdr",
    "mmpc", "si.hiton.pc", "hpc"),
  maximize = c("hc", "tabu"),
  restrict.args = list(),
  maximize.args = list(),
  version = c("rsmax2", "mmhc", "h2pc"),
  R = 200,
  m = NULL,
  threshold = 0.5,
  to = c("igraph", "adjacency", "edges", "graph", "bnlearn"),
  cluster = parallel::detectCores(),
  seed = sample(1:10^6, 1)
)

Arguments

df

Dataset.

whitelist

A data frame with two columns, containing a set of arcs to be included in the graph (optional).

blacklist

A data frame with two columns, containing a set of arcs not to be included in the graph (optional).

restrict

Constraint-based or local search algorithm to be used in the restrict phase: 'pc.stable', 'gs', 'iamb', 'fast.iamb', 'inter.iamb', 'iamb.fdr', 'mmpc', 'si.hiton.pc', or 'hpc'. Default: 'pc.stable'

maximize

Score-based algorithm to be used in the maximize phase: 'hc' or 'tabu'. Default: 'hc'

restrict.args

List of arguments to be passed to the algorithm specified by restrict.

maximize.args

List of arguments to be passed to the algorithm specified by maximize.

version

Algorithm version: 'rsmax2','mmhc', or 'h2pc'. Default: 'rsmax2'

R

Number of bootstrap replicates (optional). Default: 200

m

Size of training set (optional). Default: nrow(df)/2

threshold

Minimum strength required for a coefficient to be included in the average adjacency matrix (optional). Default: 0.5

to

Output format ('adjacency', 'edges', 'graph', 'igraph', or 'bnlearn') (optional).

cluster

A cluster object from package parallel or the number of cores to be used (optional). Default: parallel::detectCores()

seed

Seed used for random selection. Default: NULL

Examples

1
2
3
obj <- boot.rsmax2(df)
avg.g <- obj$average
g.rep <- obj$replicates

rlebron-bioinfo/gnlearn documentation built on July 25, 2020, 12:38 p.m.