Class CompactGaModel
java.lang.Object
com.knezevic.edaf.v3.models.discrete.CompactGaModel
Compact Genetic Algorithm (cGA)-style probability-vector model.
The implementation keeps a single Bernoulli vector and moves it by
fixed step toward elite empirical frequencies. This preserves the
memory-light cGA flavor while keeping integration with the generic EDA
model API deterministic and checkpoint-safe.
Update direction (per locus):
p_i invalid input: '<'- clip(p_i + step * sign(mean_elite(x_i) - p_i))
with clipping to [1e-6, 1-1e-6].-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExposes diagnostics (entropy, covariance condition number, etc.).voidfit(List<Individual<BitString>> selected, Representation<BitString> representation, RngStream rng) Fits model parameters from selected individuals.name()Model identifier used in configuration and listing commands.sample(int count, Representation<BitString> representation, Problem<BitString> problem, ConstraintHandling<BitString> constraintHandling, RngStream rng) Samples new genotypes from model.
-
Constructor Details
-
CompactGaModel
public CompactGaModel(double step) - Parameters:
step- probability move size per fit iteration
-
-
Method Details
-
name
-
fit
public void fit(List<Individual<BitString>> selected, Representation<BitString> representation, RngStream rng) Description copied from interface:ModelFits model parameters from selected individuals. -
sample
public List<BitString> sample(int count, Representation<BitString> representation, Problem<BitString> problem, ConstraintHandling<BitString> constraintHandling, RngStream rng) Description copied from interface:ModelSamples new genotypes from model. -
diagnostics
Description copied from interface:ModelExposes diagnostics (entropy, covariance condition number, etc.).- Specified by:
diagnosticsin interfaceModel<BitString>
-