A layer structure for any ICN
The layer.jl
file defines a Layer
structure and several associated functions for manipulating and interacting with this structure in the context of an Interpretable Compositional Network (ICN).
The Layer
structure is used to store a LittleDict
of operations that can be selected during the learning phase of an ICN. Each layer can be exclusive, meaning only one operation can be selected at a time. This is particularly useful in the context of ICNs, which are used to learn alternative expressions for highly combinatorial functions, such as those found in Constraint-based Local Search solvers.
Layer
A structure to store a LittleDict
of operations that can be selected during the learning phase of an ICN. If the layer is exclusive, only one operation can be selected at a time.
functions(layer)
Access the operations of a layer. The container is ordered.
exclu(layer)
Return true
if the layer has mutually exclusive operations.
symbol(layer, i)
Return the i-th symbols of the operations in a given layer.
nbits_exclu(layer)
Convert the length of an exclusive layer into a number of bits.
show_layer(layer)
Return a string that contains the elements in a layer.
selected_size(layer, layer_weights)
Return the number of operations selected by layer_weights
in layer
.
is_viable(layer, w)
is_viable(icn)
is_viable(icn, w)
Assert if a pair of layer/icn and weights compose a viable pattern. If no weights are given with an icn, it will check the current internal value.
generate_inclusive_operations(predicate, bits)
generate_exclusive_operation(max_op_number)
Generates the operations (weights) of a layer with inclusive/exclusive operations.
generate_exclusive_operation(max_op_number)
Generates the operations (weights) of a layer with exclusive operations.
Missing docstring.
Missing docstring for generate_weigths
. Check Documenter's build log for details.