PsoCtrl {dbnR}R Documentation

R6 class that defines the PSO controller

Description

Constructor of the 'PsoCtrl' class

Getter of the cluster attribute

Transforms the best position found into a bn structure and returns it

Main function of the pso algorithm.

Initialize the particles for the algorithm to random positions and velocities.

Evaluate the particles and update the global best

Modify the PSO parameters after each iteration

Arguments

n_it

maximum number of iterations of the pso algorithm

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

r_probs

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

cte

a boolean that determines whether the parameters remain constant or vary as the algorithm progresses. The increases and decreases are calculated as a function of the total number of iterations, decreasing until close to 0 and increasing until close to 1.

ordering

a vector with the names of the nodes in t_0

size

number of timeslices of the DBN

n_inds

number of particles that the algorithm will simultaneously process

v_probs

vector that defines the random velocity initialization probabilities

score

bnlearn score function used

dt

the dataset used to evaluate the position

Details

The controller will encapsulate the particles and run the algorithm

Value

A new 'PsoCtrl' object

the cluster attribute

the size attribute

Fields

parts

list with all the particles in the algorithm

cl

cluster for the parallel computations

n_it

maximum number of iterations of the pso algorithm

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

b_ps

global best position found

b_scr

global best score obtained

r_probs

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

cte

boolean that defines whether the parameters remain constant or vary as the execution progresses

in_var

decrement of the inertia each iteration

gb_var

increment of the global best parameter each iteration

lb_var

increment of the local best parameter each iteration


[Package dbnR version 0.7.8 Index]