Constructor of the 'natPsoCtrl' class
If the names of the nodes have "_t_0" appended at the end, remove it
Initialize the particles for the algorithm to random positions and velocities.
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
boolean that defines whether the parameters remain constant or vary as the execution progresses
a vector with the names of the nodes
a vector with the names of the nodes in t_0
maximum number of timeslices of the DBN
number of particles that the algorithm will simultaneously process
vector that defines the random velocity initialization probabilities
parameter of the truncated geometric distribution for sampling edges
bnlearn score function used
A new 'natPsoCtrl' object
the ordering with the names cropped
The controller will encapsulate the particles and run the algorithm. This time, it extends the class "PsoCtrl" in the "structure_learning_psoho.R" file, because both controllers are practically the same. The particles, positions and velocities are too different to extend one another though.