Skip to content

Comparison Layer

Some text to describe the comparison layer within usual ICNs.

List of comparisons

List the possible parameters and how it affects the comparison.

Non-parametric

CompositionalNetworks.co_identity Function
julia
co_identity(x)

Identity function. Already defined in Julia as identity, specialized for scalars in the comparison layer.

source

CompositionalNetworks.co_euclidean Function
julia
co_euclidean(x; dom_size)

Compute an euclidean norm with domain size dom_size of a scalar.

source

CompositionalNetworks.co_abs_diff_var_vars Function
julia
co_abs_diff_var_vars(x; nvars)

Return the absolute difference between x and the number of variables nvars.

source

CompositionalNetworks.co_var_minus_vars Function
julia
co_var_minus_vars(x; nvars)

Return the difference x - nvars if positive, 0.0 otherwise, where nvars denotes the numbers of variables.

source

CompositionalNetworks.co_vars_minus_var Function
julia
co_vars_minus_var(x; nvars)

Return the difference nvars - x if positive, 0.0 otherwise, where nvars denotes the numbers of variables.

source

Param: :val

CompositionalNetworks.co_abs_diff_var_val Function
julia
co_abs_diff_var_val(x; val)

Return the absolute difference between x and val.

source

CompositionalNetworks.co_var_minus_val Function
julia
co_var_minus_val(x; val)

Return the difference x - val if positive, 0.0 otherwise.

source

CompositionalNetworks.co_val_minus_var Function
julia
co_val_minus_var(x; val)

Return the difference val - x if positive, 0.0 otherwise.

source

CompositionalNetworks.co_euclidean_val Function
julia
co_euclidean_val(x; val, dom_size)

Compute an euclidean norm with domain size dom_size, weighted by val, of a scalar.

source

Layer generation

CompositionalNetworks.make_comparisons Function
julia
make_comparisons(param::Symbol)

Generate the comparison functions for the given parameter.

source

CompositionalNetworks.comparison_layer Function
julia
comparison_layer(param = false)

Generate the layer of transformations functions of the ICN. Iff param value is set, also includes all the parametric comparison with that value. The operations are mutually exclusive, that is only one will be selected.

source