Class TokenCategoricalModel
java.lang.Object
com.knezevic.edaf.v3.models.discrete.token.TokenCategoricalModel
- All Implemented Interfaces:
Model<VariableLengthVector<Integer>>
public final class TokenCategoricalModel
extends Object
implements Model<VariableLengthVector<Integer>>
Categorical token model for variable-length integer vectors.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExposes diagnostics (entropy, covariance condition number, etc.).voidfit(List<Individual<VariableLengthVector<Integer>>> selected, Representation<VariableLengthVector<Integer>> representation, RngStream rng) Fits model parameters from selected individuals.name()Model identifier used in configuration and listing commands.sample(int count, Representation<VariableLengthVector<Integer>> representation, Problem<VariableLengthVector<Integer>> problem, ConstraintHandling<VariableLengthVector<Integer>> constraintHandling, RngStream rng) Samples new genotypes from model.
-
Constructor Details
-
TokenCategoricalModel
public TokenCategoricalModel(int maxToken, double smoothing)
-
-
Method Details
-
name
-
fit
public void fit(List<Individual<VariableLengthVector<Integer>>> selected, Representation<VariableLengthVector<Integer>> representation, RngStream rng) Description copied from interface:ModelFits model parameters from selected individuals.- Specified by:
fitin interfaceModel<VariableLengthVector<Integer>>
-
sample
public List<VariableLengthVector<Integer>> sample(int count, Representation<VariableLengthVector<Integer>> representation, Problem<VariableLengthVector<Integer>> problem, ConstraintHandling<VariableLengthVector<Integer>> constraintHandling, RngStream rng) Description copied from interface:ModelSamples new genotypes from model.- Specified by:
samplein interfaceModel<VariableLengthVector<Integer>>
-
diagnostics
Description copied from interface:ModelExposes diagnostics (entropy, covariance condition number, etc.).- Specified by:
diagnosticsin interfaceModel<VariableLengthVector<Integer>>
-