Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/alexplatasl/dplbnde/llms.txt

Use this file to discover all available pages before exploring further.

maswchains is a memetic algorithm based on MA-SW-Chains. Each individual maintains its own persistent Solis-Wets state across generations. After each DE/rand/1/bin phase, local search budget is distributed across individuals weighted by fitness rank and historical improvement.

Usage

maswchains(
  NP = 40,
  G = 100,
  data,
  class.name,
  F = 0.5,
  CR = 0.9,
  structure = c("nb", "tancl", "tan", "hc"),
  edgelist = NULL,
  ls_evals_ratio = 0.5,
  verbose = 25,
  ...
)

Parameters

NP
integer
default:"40"
Population size.
G
integer
default:"100"
Maximum generations.
data
data.frame
required
Training data frame.
class.name
character
required
Class variable column name.
F
numeric
default:"0.5"
Mutation factor for DE/rand/1. Range [0, 2].
CR
numeric
default:"0.9"
Crossover rate. Range [0, 1].
structure
character
default:"nb"
BN structure: "nb", "tan", "tancl", "hc".
edgelist
matrix
Optional custom BN topology (edges × 2 matrix).
ls_evals_ratio
numeric
default:"0.5"
Fraction of NP used as total local search budget per generation.
verbose
integer
default:"25"
Print progress every this many generations.
...
Extra arguments for bnclassify::tan_cl or bnclassify::tan_hc.

Return value

Object of class DE: Best, BestCLL, pobFinal, CLLPobFinal, N.evals, convergence, evaluations.

Example

library(dplbnDE)
data(car)

result <- maswchains(
  NP = 20, G = 25,
  data = car,
  class.name = names(car)[7],
  verbose = 5
)
print(result)