Class NormalizingFlowModel
java.lang.Object
com.knezevic.edaf.v3.models.continuous.NormalizingFlowModel
- All Implemented Interfaces:
Model<RealVector>
Lightweight flow-based density model for continuous EDAs.
Sampling transformation:
z ~ N(0, I) u_i = z_i + alpha_i * tanh(z_i) x = mu + L uwhere
L is the Cholesky factor of a smoothed covariance estimate and
alpha_i is adapted from whitened-sample skewness.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]Exposes diagnostics (entropy, covariance condition number, etc.).voidfit(List<Individual<RealVector>> selected, Representation<RealVector> representation, RngStream rng) Fits model parameters from selected individuals.double[]mean()name()Model identifier used in configuration and listing commands.voidrestore(double[] mean, double[][] covariance, double[] skew) Restores flow model state from checkpoint payload.sample(int count, Representation<RealVector> representation, Problem<RealVector> problem, ConstraintHandling<RealVector> constraintHandling, RngStream rng) Samples new genotypes from model.double[]skew()
-
Constructor Details
-
NormalizingFlowModel
public NormalizingFlowModel(double jitter, double learningRate, double maxSkew)
-
-
Method Details
-
name
Description copied from interface:ModelModel identifier used in configuration and listing commands.- Specified by:
namein interfaceModel<RealVector>
-
fit
public void fit(List<Individual<RealVector>> selected, Representation<RealVector> representation, RngStream rng) Description copied from interface:ModelFits model parameters from selected individuals.- Specified by:
fitin interfaceModel<RealVector>
-
sample
public List<RealVector> sample(int count, Representation<RealVector> representation, Problem<RealVector> problem, ConstraintHandling<RealVector> constraintHandling, RngStream rng) Description copied from interface:ModelSamples new genotypes from model.- Specified by:
samplein interfaceModel<RealVector>
-
diagnostics
Description copied from interface:ModelExposes diagnostics (entropy, covariance condition number, etc.).- Specified by:
diagnosticsin interfaceModel<RealVector>
-
mean
public double[] mean() -
covariance
public double[][] covariance() -
skew
public double[] skew() -
restore
public void restore(double[] mean, double[][] covariance, double[] skew) Restores flow model state from checkpoint payload.
-