natPsoho: Learn a DBN structure with a PSO approach

View source: R/structure_learning_natpsoho.R

natPsohoR Documentation

Learn a DBN structure with a PSO approach

Description

Given a dataset and the desired Markovian order, this function returns a DBN structure ready to be fitted. Original algorithm at https://link.springer.com/chapter/10.1007/978-3-030-86271-8_14

Usage

natPsoho(
  dt,
  size,
  f_dt = NULL,
  n_inds = 50,
  n_it = 50,
  in_cte = 1,
  gb_cte = 0.5,
  lb_cte = 0.5,
  v_probs = c(10, 65, 25),
  r_probs = c(-0.5, 1.5),
  score = "bge",
  p = 0.06,
  cte = TRUE
)

Arguments

dt

a data.table with the data of the network to be trained

size

Maximum number of timeslices of the DBN allowed. Markovian order 1 equals size 2, and so on

f_dt

previously folded dataset, in case some specific rows have to be removed after the folding

n_inds

Number of particles used in the algorithm

n_it

Maximum number of iterations that the algorithm can perform

in_cte

parameter that varies the effect of the inertia

gb_cte

parameter that varies the effect of the global best

lb_cte

parameter that varies the effect of the local best

v_probs

vector that defines the random velocity initialization probabilities

r_probs

vector that defines the range of random variation of gb_cte and lb_cte

score

bnlearn score function used

p

parameter of the truncated geometric distribution for sampling edges

cte

a boolean that determines whether the inertia, global best and local best parameters remain constant or vary as the algorithm progresses. Inertia and local best values decrease as the global best increases, to favor exploration at first and exploitation at the end

Value

A 'dbn' object with the structure of the best network found


dbnR documentation built on Oct. 5, 2022, 1:07 a.m.