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
A new 'PsoCtrl' object
the cluster attribute
the size attribute
maximum number of iterations of the pso algorithm
parameter that varies the effect of the inertia
parameter that varies the effect of the global best
parameter that varies the effect of the local best
vector that defines the range of random variation of gb_cte and lb_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.
a vector with the names of the nodes in t_0
number of timeslices of the DBN
number of particles that the algorithm will simultaneously process
vector that defines the random velocity initialization probabilities
bnlearn score function used
the dataset used to evaluate the position
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
The controller will encapsulate the particles and run the algorithm