tabu: Tabu Search Algorithm (TABU)

Description Usage Arguments Examples

View source: R/algorithms.R

Description

This function allows you to learn a directed graph from a dataset using the Tabu Search algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
tabu(
  df,
  start = NULL,
  whitelist = NULL,
  blacklist = NULL,
  score = scores,
  tabu = 10,
  max.tabu = NULL,
  max.iter = Inf,
  maxp = Inf,
  m = NULL,
  to = c("igraph", "adjacency", "edges", "graph", "bnlearn"),
  seed = sample(1:10^6, 1)
)

Arguments

df

Dataset.

start

Preseeded directed acyclic graph used to initialize the algorithm (optional).

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).

score

Score to be used: 'pred-loglik-g', 'loglik-g', 'aic-g', 'bic-g', or 'bge'. Default: 'pred-loglik-g'

tabu

Length of the tabu list. Default: 10

max.tabu

Iterations tabu search can perform without improving the best score. Default: tabu (10)

max.iter

Maximum number of iterations. Default: Inf

maxp

Maximum number of parents for a node. Default: Inf

m

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

to

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

seed

Seed used for random selection. Default: NULL

Examples

1
g <- tabu(df)

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