natParticle {dbnR}R Documentation

R6 class that defines a Particle in the PSO algorithm

Description

Constructor of the 'natParticle' 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

nodes

a vector with the names of the nodes

ordering

a vector with the names of the nodes in t_0

ordering_raw

a vector with the names of the nodes without the appended "_t_0"

max_size

maximum number of timeslices of the DBN

v_probs

vector of probabilities for the velocity sampling

p

parameter of the truncated geometric distribution

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 'natParticle' object

The score of the current position

Fields

ps

position of the particle

cl

velocity of the particle

velocity

that takes the particle to the global best

velocity

that takes the particle to the local best

lb

local best score obtained

lb_ps

local best position found

score

bnlearn score function used


[Package dbnR version 0.7.8 Index]