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.

lshade implements L-SHADE: history-based parameter adaptation (like JADE) combined with Linear Population Size Reduction (LPSR), which shrinks the population from NP down to 4 over the course of evolution. This concentrates evaluations on the most promising individuals as the search matures.

Usage

lshade(
  NP = 40,
  G = 100,
  data,
  class.name,
  c = 0.1,
  structure = c("nb", "tancl", "tan", "hc"),
  pB = 0.05,
  edgelist = NULL,
  verbose = 25,
  ...
)

Parameters

NP
integer
default:"40"
Initial population size. Reduced linearly to 4 over G generations.
G
integer
default:"100"
Maximum generations.
data
data.frame
required
Data frame containing features and the class variable.
class.name
character
required
Name of the class variable column.
c
numeric
default:"0.1"
Learning rate for history memory update. Must be in [0, 0.2].
structure
character
default:"nb"
BN structure: "nb", "tan", "tancl", or "hc".
pB
numeric
default:"0.05"
Fraction of best individuals used in current-to-pbest mutation.
edgelist
matrix
Optional custom BN topology (edges × 2 matrix: from, to).
verbose
integer
default:"25"
Print progress every this many generations.
...
Extra arguments forwarded to bnclassify::tan_cl or bnclassify::tan_hc.

Return value

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

Example

library(dplbnDE)
data(car)

result <- lshade(
  NP = 20, G = 25,
  data = car,
  class.name = names(car)[7],
  c = 0.1, pB = 0.05,
  structure = "tan",
  verbose = 5
)
print(result)
plot(result)