Class EdgeHistogramModel
java.lang.Object
com.knezevic.edaf.v3.models.permutation.EdgeHistogramModel
- All Implemented Interfaces:
Model<PermutationVector>
Edge Histogram Model (EHM) for permutation EDAs.
Model stores transition probabilities between consecutive items:
P(next = j | current = i)estimated from elite edge frequencies with additive
epsilon
smoothing. Sampling builds a Hamiltonian path greedily by repeatedly
drawing the next unused item from the transition row of the current item.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExposes diagnostics (entropy, covariance condition number, etc.).voidfit(List<Individual<PermutationVector>> selected, Representation<PermutationVector> representation, RngStream rng) Fits model parameters from selected individuals.name()Model identifier used in configuration and listing commands.voidrestore(double[][] transitions) Restores transition matrix state from checkpoint payload.sample(int count, Representation<PermutationVector> representation, Problem<PermutationVector> problem, ConstraintHandling<PermutationVector> constraintHandling, RngStream rng) Samples new genotypes from model.double[][]Returns a deep copy of transition matrix for checkpoint persistence.
-
Constructor Details
-
EdgeHistogramModel
public EdgeHistogramModel(double epsilon) - Parameters:
epsilon- additive smoothing for transition counts
-
-
Method Details
-
name
Description copied from interface:ModelModel identifier used in configuration and listing commands.- Specified by:
namein interfaceModel<PermutationVector>
-
fit
public void fit(List<Individual<PermutationVector>> selected, Representation<PermutationVector> representation, RngStream rng) Description copied from interface:ModelFits model parameters from selected individuals.- Specified by:
fitin interfaceModel<PermutationVector>
-
sample
public List<PermutationVector> sample(int count, Representation<PermutationVector> representation, Problem<PermutationVector> problem, ConstraintHandling<PermutationVector> constraintHandling, RngStream rng) Description copied from interface:ModelSamples new genotypes from model.- Specified by:
samplein interfaceModel<PermutationVector>
-
diagnostics
Description copied from interface:ModelExposes diagnostics (entropy, covariance condition number, etc.).- Specified by:
diagnosticsin interfaceModel<PermutationVector>
-
transitions
public double[][] transitions()Returns a deep copy of transition matrix for checkpoint persistence. -
restore
public void restore(double[][] transitions) Restores transition matrix state from checkpoint payload.
-