Skip to content

ConstraintLearning.jl

Documentation for ConstraintLearning.jl.

ConstraintLearning.ICNConfig Type
julia
struct ICNConfig{O <: ICNOptimizer}

A structure to hold the metric and optimizer configurations used in learning the weights of an ICN.

source

ConstraintLearning.ICNConfig Method
julia
ICNConfig(; metric = :hamming, optimizer = ICNGeneticOptimizer())

Constructor for ICNConfig. Defaults to hamming metric using a genetic algorithm.

source

ConstraintLearning.ICNGeneticOptimizer Method
julia
ICNGeneticOptimizer(; kargs...)

Default constructor to learn an ICN through a Genetic Algorithm. Default kargs TBW.

source

ConstraintLearning.ICNLocalSearchOptimizer Type
julia
ICNLocalSearchOptimizer(options = LocalSearchSolvers.Options())

Default constructor to learn an ICN through a CBLS solver.

source

ConstraintLearning.ICNOptimizer Type
julia
const ICNOptimizer = CompositionalNetworks.AbstractOptimizer

An abstract type for optmizers defined to learn ICNs.

source

ConstraintLearning.QUBOGradientOptimizer Method
julia
QUBOGradientOptimizer(; kargs...)

A QUBO optimizer based on gradient descent. Defaults TBW

source

ConstraintLearning.QUBOOptimizer Type
julia
const QUBOOptimizer = QUBOConstraints.AbstractOptimizer

An abstract type for optimizers used to learn QUBO matrices from constraints.

source

CompositionalNetworks.optimize! Method
julia
CompositionalNetworks.optimize!(icn, solutions, non_sltns, dom_size, metric, optimizer::ICNGeneticOptimizer; parameters...)

Extends the optimize! method to ICNGeneticOptimizer.

source

CompositionalNetworks.optimize! Method
julia
CompositionalNetworks.optimize!(icn, solutions, non_sltns, dom_size, metric, optimizer::ICNLocalSearchOptimizer; parameters...)

Extends the optimize! method to ICNLocalSearchOptimizer.

source

ConstraintLearning._optimize! Method
julia
_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.

source

ConstraintLearning.domain_size Method
julia
domain_size(ds::Number)

Extends the domain_size function when ds is number (for dispatch purposes).

source

ConstraintLearning.generate_population Method
julia
generate_population(icn, pop_size

Generate a pôpulation of weights (individuals) for the genetic algorithm weighting icn.

source

ConstraintLearning.icn Method
julia
icn(X,X̅; kargs..., parameters...)

TBW

source

ConstraintLearning.loss Method
julia
loss(x, y, Q)

Loss of the prediction given by Q, a training set y, and a given configuration x.

source

ConstraintLearning.make_df Method
julia
make_df(X, Q, penalty, binarization, domains)

DataFrame arrangement to output some basic evaluation of a matrix Q.

source

ConstraintLearning.make_set_penalty Method
julia
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 .

source

ConstraintLearning.make_training_sets Method
julia
make_training_sets(X, penalty, args...)

Return a pair of solutions and non solutions sets based on X and penalty.

source

ConstraintLearning.mutually_exclusive Method
julia
mutually_exclusive(layer, w)

Constraint ensuring that w encode exclusive operations in layer.

source

ConstraintLearning.no_empty_layer Method
julia
no_empty_layer(x; X = nothing)

Constraint ensuring that at least one operation is selected.

source

ConstraintLearning.optimize! Method
julia
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.

source

ConstraintLearning.parameter_specific_operations Method
julia
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.

source

ConstraintLearning.predict Method
julia
predict(x, Q)

Return the predictions given by Q for a given configuration x.

source

ConstraintLearning.preliminaries Method
julia
preliminaries(args)

Preliminaries to the training process in a QUBOGradientOptimizer run.

source

ConstraintLearning.qubo Function
julia
qubo(X,X̅; kargs..., parameters...)

TBW

source

ConstraintLearning.sub_eltype Method
julia
sub_eltype(X)

Return the element type of of the first element of a collection.

source

ConstraintLearning.train! Method
julia
train!(Q, X, penalty, η, precision, X_test, oversampling, binarization, domains)

Training inner method.

source

ConstraintLearning.train Method
julia
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.

source

ConstraintLearning.δ Method
julia
δ(X[, Y]; discrete = true)

Compute the extrema over a collection X``or a pair of collection(X, Y)`.

source