Skip to content

ConstraintLearning.jl

Documentation for ConstraintLearning.jl.

# ConstraintLearning.ICNConfigType.
julia
struct ICNConfig{O <: ICNOptimizer}

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

source


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

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

source


# ConstraintLearning.ICNGeneticOptimizerMethod.
julia
ICNGeneticOptimizer(; kargs...)

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

source


# ConstraintLearning.ICNLocalSearchOptimizerType.
julia
ICNLocalSearchOptimizer(options = LocalSearchSolvers.Options())

Default constructor to learn an ICN through a CBLS solver.

source


# ConstraintLearning.ICNOptimizerType.
julia
const ICNOptimizer = CompositionalNetworks.AbstractOptimizer

An abstract type for optmizers defined to learn ICNs.

source


# ConstraintLearning.QUBOGradientOptimizerMethod.
julia
QUBOGradientOptimizer(; kargs...)

A QUBO optimizer based on gradient descent. Defaults TBW

source


# ConstraintLearning.QUBOOptimizerType.
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_sizeMethod.
julia
domain_size(ds::Number)

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

source


# ConstraintLearning.generate_populationMethod.
julia
generate_population(icn, pop_size

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

source


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

TBW

source


# ConstraintLearning.lossMethod.
julia
loss(x, y, Q)

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

source


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

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

source


# ConstraintLearning.make_set_penaltyMethod.
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_setsMethod.
julia
make_training_sets(X, penalty, args...)

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

source


# ConstraintLearning.mutually_exclusiveMethod.
julia
mutually_exclusive(layer, w)

Constraint ensuring that w encode exclusive operations in layer.

source


# ConstraintLearning.no_empty_layerMethod.
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_operationsMethod.
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.predictMethod.
julia
predict(x, Q)

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

source


# ConstraintLearning.preliminariesMethod.
julia
preliminaries(args)

Preliminaries to the training process in a QUBOGradientOptimizer run.

source


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

TBW

source


# ConstraintLearning.sub_eltypeMethod.
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.trainMethod.
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