ConstraintLearning.jl
Documentation for ConstraintLearning.jl.
ConstraintLearning.ICNConfig Type
struct ICNConfig{O <: ICNOptimizer}A structure to hold the metric and optimizer configurations used in learning the weights of an ICN.
ConstraintLearning.ICNConfig Method
ICNConfig(; metric = :hamming, optimizer = ICNGeneticOptimizer())Constructor for ICNConfig. Defaults to hamming metric using a genetic algorithm.
ConstraintLearning.ICNGeneticOptimizer Method
ICNGeneticOptimizer(; kargs...)Default constructor to learn an ICN through a Genetic Algorithm. Default kargs TBW.
ConstraintLearning.ICNLocalSearchOptimizer Type
ICNLocalSearchOptimizer(options = LocalSearchSolvers.Options())Default constructor to learn an ICN through a CBLS solver.
ConstraintLearning.ICNOptimizer Type
const ICNOptimizer = CompositionalNetworks.AbstractOptimizerAn abstract type for optmizers defined to learn ICNs.
ConstraintLearning.QUBOGradientOptimizer Method
QUBOGradientOptimizer(; kargs...)A QUBO optimizer based on gradient descent. Defaults TBW
ConstraintLearning.QUBOOptimizer Type
const QUBOOptimizer = QUBOConstraints.AbstractOptimizerAn abstract type for optimizers used to learn QUBO matrices from constraints.
CompositionalNetworks.optimize! Method
CompositionalNetworks.optimize!(icn, solutions, non_sltns, dom_size, metric, optimizer::ICNGeneticOptimizer; parameters...)Extends the optimize! method to ICNGeneticOptimizer.
CompositionalNetworks.optimize! Method
CompositionalNetworks.optimize!(icn, solutions, non_sltns, dom_size, metric, optimizer::ICNLocalSearchOptimizer; parameters...)Extends the optimize! method to ICNLocalSearchOptimizer.
ConstraintLearning._optimize! Method
_optimize!(icn, X, X_sols; metric = hamming, pop_size = 200)Optimize and set the weights of an ICN with a given set of configuration X and solutions X_sols.
ConstraintLearning.domain_size Method
domain_size(ds::Number)Extends the domain_size function when ds is number (for dispatch purposes).
ConstraintLearning.generate_population Method
generate_population(icn, pop_sizeGenerate a pôpulation of weights (individuals) for the genetic algorithm weighting icn.
ConstraintLearning.loss Method
loss(x, y, Q)Loss of the prediction given by Q, a training set y, and a given configuration x.
ConstraintLearning.make_df Method
make_df(X, Q, penalty, binarization, domains)DataFrame arrangement to output some basic evaluation of a matrix Q.
ConstraintLearning.make_set_penalty Method
make_set_penalty(X, X̅, args...; kargs)Return a penalty function when the training set is already split into a pair of solutions X and non solutions X̅.
ConstraintLearning.make_training_sets Method
make_training_sets(X, penalty, args...)Return a pair of solutions and non solutions sets based on X and penalty.
ConstraintLearning.mutually_exclusive Method
mutually_exclusive(layer, w)Constraint ensuring that w encode exclusive operations in layer.
ConstraintLearning.no_empty_layer Method
no_empty_layer(x; X = nothing)Constraint ensuring that at least one operation is selected.
ConstraintLearning.optimize! Method
optimize!(icn, X, X_sols, global_iter, local_iter; metric=hamming, popSize=100)Optimize and set the weights of an ICN with a given set of configuration X and solutions X_sols. The best weights among global_iter will be set.
ConstraintLearning.parameter_specific_operations Method
parameter_specific_operations(x; X = nothing)Constraint ensuring that at least one operation related to parameters is selected if the error function to be learned is parametric.
ConstraintLearning.predict Method
predict(x, Q)Return the predictions given by Q for a given configuration x.
ConstraintLearning.preliminaries Method
preliminaries(args)Preliminaries to the training process in a QUBOGradientOptimizer run.
ConstraintLearning.sub_eltype Method
sub_eltype(X)Return the element type of of the first element of a collection.
ConstraintLearning.train! Method
train!(Q, X, penalty, η, precision, X_test, oversampling, binarization, domains)Training inner method.
ConstraintLearning.train Method
train(X, penalty[, d]; optimizer = QUBOGradientOptimizer(), X_test = X)Learn a QUBO matrix on training set X for a constraint defined by penalty with optional domain information d. By default, it uses a QUBOGradientOptimizer and X as a testing set.
ConstraintLearning.δ Method
δ(X[, Y]; discrete = true)Compute the extrema over a collection X``or a pair of collection(X, Y)`.