Particle {dbnR}R Documentation

R6 class that defines a Particle in the PSO algorithm

Description

Constructor of the 'Particle' class

Evaluate the score of the particle's position

Evaluate the score of the particle's position. Updates the local best if the new one is better.

Update the position of the particle with the velocity

Update the position of the particle given the constants after calculating the new velocity

Arguments

ordering

a vector with the names of the nodes in t_0

size

number of timeslices of the DBN

v_probs

vector that defines the random velocity initialization probabilities

score

bnlearn score function used

dt

dataset to evaluate the fitness of the particle

in_cte

parameter that varies the effect of the inertia

gb_cte

parameter that varies the effect of the global best

gb_ps

position 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

Details

A particle has a Position, a Velocity and a local best

Value

A new 'Particle' object

The score of the current position

Fields

ps

position of the particle

cl

velocity of the particle

lb

local best score obtained

lb_ps

local best position found

score

bnlearn score function used


[Package dbnR version 0.7.8 Index]