Developer Index

This page lists the types and functions that are internal to the AdaptiveResonance.jl package. Because they are not part of the public API, these names might change relatively frequently between versions and so should not be relied upon.

All internal names are listed in the Index, and each of these entries link to the docstrings in the Docs section.

Index

This section contains a list of internal names that link to their corresponding Documentation.

Methods

Types

Constants

Docs

Documentation for all internal names are listed below.

AdaptiveResonance.ARTStatsType

ARTStats

Description

Definition of the ART module statistics dictionary, used to generate and store various logs during training and testing.

source
AdaptiveResonance.MergeARTType
mutable struct MergeART <: ART

Summary

MergeART module struct.

For module options, see AdaptiveResonance.opts_MergeART.

References

  1. L. E. Brito da Silva, I. Elnabarawy, and D. C. Wunsch, 'Distributed dual vigilance fuzzy adaptive resonance theory learns online, retrieves arbitrarily-shaped clusters, and mitigates order dependence,' Neural Networks, vol. 121, pp. 208-228, 2020, doi: 10.1016/j.neunet.2019.08.033.
  2. G. Carpenter, S. Grossberg, and D. Rosen, 'Fuzzy ART: Fast stable learning and categorization of analog patterns by an adaptive resonance system,' Neural Networks, vol. 4, no. 6, pp. 759-771, 1991.

Fields

  • opts::opts_DDVFA: DDVFA options struct.
  • subopts::opts_FuzzyART: FuzzyART options struct used for all F2 nodes.
  • config::DataConfig: Data configuration struct.
  • threshold::Float64: Operating module threshold value, a function of the vigilance parameter.
  • F2::Vector{FuzzyART}: List of F2 nodes (themselves FuzzyART modules).
  • labels::Vector{Int64}: Incremental list of labels corresponding to each F2 node, self-prescribed or supervised.
  • n_categories::Int64: Number of total categories.
  • epoch::Int64: Current training epoch.
  • T::Vector: DDVFA activation values.
  • M::Vector: DDVFA match values.
  • stats::Dict{String, Any}: Runtime statistics for the module, implemented as a dictionary containing entries at the end of each training iteration. These entries include the best-matching unit index and the activation and match values of the winning node.
source
AdaptiveResonance.opts_MergeARTType
mutable struct opts_MergeART <: ARTOpts

Summary

MergeART options struct.

These options are a Parameters.jl struct, taking custom options keyword arguments. Each field has a default value listed below.

Fields

  • rho_lb::Float64: Lower-bound vigilance parameter: rho_lb ∈ [0, 1]. Default: 0.7

  • rho_ub::Float64: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.85

  • alpha::Float64: Choice parameter: alpha > 0. Default: 0.001

  • beta::Float64: Learning parameter: beta ∈ (0, 1]. Default: 1.0

  • gamma::Float64: Pseudo kernel width: gamma >= 1. Default: 3.0

  • gamma_ref::Float64: Reference gamma for normalization: 0 <= gamma_ref < gamma. Default: 1.0

  • similarity::Symbol: Similarity method (activation and match): similarity ∈ [:single, :average, :complete, :median, :weighted, :centroid]. Default: :single

  • max_epoch::Int64: Maximum number of epochs during training: max_epochs ∈ (1, Inf). Default: 1

  • display::Bool: Display flag for progress bars. Default: false

  • gamma_normalization::Bool: Flag to normalize the threshold by the feature dimension. Default: true

  • uncommitted::Bool: Flag to use an uncommitted node when learning.

    If true, new weights are created with ones(dim) and learn on the complement-coded sample. If false, fast-committing is used where the new weight is simply the complement-coded sample. Default: false

  • activation::Symbol: Selected activation function. Default: :gamma_activation

  • match::Symbol: Selected match function. Default: :gamma_match

  • update::Symbol: Selected weight update function. Default: :basic_update

source
AdaptiveResonance.activation_match!Method
activation_match!(
    art::AdaptiveResonance.AbstractFuzzyART,
    x::AbstractVector{T} where T<:Real
)

Summary

Computes the activation and match functions of the ART module against sample x.

Arguments

  • art::AbstractFuzzyART: the single FuzzyART module to compute the activation and match values for all weights.
  • x::RealVector: the sample to compute the activation and match functions against.

Examples

julia> my_FuzzyART = FuzzyART()
FuzzyART
    opts: opts_FuzzyART
    ...
julia> x = rand(3, 10)
julia> train!(my_FuzzyART, x)
julia> activation_match!(my_FuzzyART, x[:, 1])

Method List / Definition Locations

activation_match!(art, x)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/common.jl:51.

source
AdaptiveResonance.art_activationMethod
art_activation(
    art::ARTModule,
    x::AbstractVector{T} where T<:Real,
    index::Integer,
    args...
) -> Any

Summary

Evaluates the activation function of the ART/ARTMAP module on the sample 'x' with weight 'W'.

Passes additional arguments for low-level optimizations using function dispatch.

Arguments

  • art::ARTModule: the ARTModule module.

  • x::RealVector: the sample vector to use.

  • index::Integer: the index of the weight column to use.

Method List / Definition Locations

art_activation(art, x, index, args)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/symbols.jl:140.

source
AdaptiveResonance.art_matchMethod
art_match(
    art::ARTModule,
    x::AbstractVector{T} where T<:Real,
    index::Integer,
    args...
) -> Any

Summary

Evaluates the match function of the ART/ARTMAP module on sample 'x' with weight 'W'.

Passes additional arguments for low-level optimizations using function dispatch.

Arguments

  • art::ARTModule: the ARTModule module.

  • x::RealVector: the sample vector to use.

  • index::Integer: the index of the weight column to use.

Method List / Definition Locations

art_match(art, x, index, args)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/symbols.jl:126.

source
AdaptiveResonance.centroidMethod
centroid(
    F2::FuzzyART,
    sample::AbstractVector{T} where T<:Real,
    activation::Bool
) -> Any

Summary

Centroid linkage DDVFA similarity function.

Arguments:

  • F2::FuzzyART: the DDVFA FuzzyART F2 node to compute the linkage method within.

  • sample::RealVector: the sample to use for computing the linkage to the F2 module.

  • activation::Bool: flag to use the activation function. False uses the match function.

Method List / Definition Locations

centroid(F2, sample, activation)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:526.

source
AdaptiveResonance.choice_by_differenceMethod
choice_by_difference(
    art::ARTModule,
    x::AbstractVector{T} where T<:Real,
    W::AbstractVector{T} where T<:Real
) -> Any

Summary

Default ARTMAP's choice-by-difference activation function.

Arguments

  • art::ARTModule: the ARTModule module.

  • x::RealVector: the sample vector to use.

  • W::RealVector: the weight vector to use.

Method List / Definition Locations

choice_by_difference(art, x, W)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/symbols.jl:109.

source
AdaptiveResonance.create_category!Method

Summary

Creates a category for the ARTModule module, expanding the weights and incrementing the category labels.

Arguments

  • art::ARTModule: the ARTModule module to add a category to.
  • x::RealVector: the sample to use for adding a category.
  • y::Integer: the new label for the new category.

Method List / Definition Locations

create_category!(art, sample, label)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:396.

create_category!(art, x, y; new_cluster)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:237.

create_category!(art, x, y)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:269.

create_category!(art, x, y)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/SFAM.jl:205.

source
AdaptiveResonance.create_category!Method
create_category!(
    art::DDVFA,
    sample::AbstractVector{T} where T<:Real,
    label::Integer
) -> Vector{FuzzyART}

Summary

Create a new category by appending and initializing a new FuzzyART node to F2.

Arguments

  • art::DDVFA: the DDVFA module to create a new FuzzyART category in.
  • sample::RealVector: the sample to use for instantiating the new category.
  • label::Integer: the new label to use for the new category.

Method List / Definition Locations

create_category!(art, sample, label)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:396.

source
AdaptiveResonance.create_category!Method
create_category!(
    art::DVFA,
    x::AbstractVector{T} where T<:Real,
    y::Integer;
    new_cluster
) -> Vector{Int64}

Summary

Creates a new category for the DVFA modules.

Arguments

  • art::DVFA: the DVFA module to add a category to.
  • x::RealVector: the sample to use for adding a category.
  • y::Integer: the new label for the new category.

Method List / Definition Locations

create_category!(art, x, y; new_cluster)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:237.

source
AdaptiveResonance.gamma_matchMethod
gamma_match(
    art::ARTModule,
    _::AbstractVector{T} where T<:Real,
    W::AbstractVector{T} where T<:Real,
    gamma_act::Real
) -> Any

Summary

Gamma-normalized match function, passing a precomputed gamma activation value.

Arguments

  • art::ARTModule: the ARTModule module.

  • x::RealVector: the sample vector to use.

  • W::RealVector: the weight vector to use.

  • gamma_act::Real: the precomputed gamma activation value.

Method List / Definition Locations

gamma_match(art, _, W, gamma_act)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/symbols.jl:91.

source
AdaptiveResonance.gamma_matchMethod
gamma_match(
    art::ARTModule,
    x::AbstractVector{T} where T<:Real,
    W::AbstractVector{T} where T<:Real
) -> Any

Summary

Gamma-normalized match function, recomputing the gamma activation value.

Arguments

  • art::ARTModule: the ARTModule module.

  • x::RealVector: the sample vector to use.

  • W::RealVector: the weight vector to use.

Method List / Definition Locations

gamma_match(art, x, W)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/symbols.jl:81.

source
AdaptiveResonance.gamma_match_subMethod
gamma_match_sub(
    art::ARTModule,
    W::AbstractVector{T} where T<:Real,
    gamma_act::Real
) -> Any

Summary

Low-level subroutine for the gamma match function with a precomputed gamma activation.

Arguments

  • art::ARTModule: the ARTModule module.

  • W::RealVector: the weight vector to use.

  • gamma_act::Real: the precomputed gamma activation value.

Method List / Definition Locations

gamma_match_sub(art, W, gamma_act)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/symbols.jl:72.

source
AdaptiveResonance.get_iteratorMethod
get_iterator(opts::ARTOpts, n_samples::Integer) -> Any

Summary

Creates an iterator object according to the ART/ARTMAP modules display settings for batch iteration.

Arguments

  • opts::ARTOpts: the ART/ARTMAP module's options containing display settings.
  • n_samples::Integer: the number of iterations to create the iterator for.

Method List / Definition Locations

get_iterator(opts, n_samples)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:417.

source
AdaptiveResonance.get_sampleMethod
get_sample(
    x::AbstractMatrix{T} where T<:Real,
    i::Integer
) -> Any

Summary

Returns a sample from data array x at sample location i. This function implements the convention that columns are samples while rows are features within samples.

Arguments

  • x::RealMatrix: the batch of data to grab a sample from.
  • i::Integer: the index to get the sample from.

Method List / Definition Locations

get_sample(x, i)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:453.

source
AdaptiveResonance.init_classify!Method
init_classify!(
    x::AbstractArray{T} where T<:Real,
    art::ARTModule,
    preprocessed::Bool
) -> Any

Summary

Initializes the classification loop for batch inference.

Arguments

  • x::RealArray: the data that is used for inference.
  • art::ARTModule: the ART/ARTMAP module that will be used for inference.
  • preprocessed::Bool: required flag for if the data has already been complement coded and normalized.

Method List / Definition Locations

init_classify!(x, art, preprocessed)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:519.

source
AdaptiveResonance.init_train!Method
init_train!(
    x::AbstractMatrix{T} where T<:Real,
    art::ARTModule,
    preprocessed::Bool
) -> Any

Summary

Initializes the training loop for batch learning.

Arguments

  • x::RealMatrix: the data that is used for training.
  • art::ARTModule: the ART/ARTMAP that will be trained.
  • preprocessed::Bool: required flag for if the data has already been complement coded and normalized.

Method List / Definition Locations

init_train!(x, art, preprocessed)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:501.

source
AdaptiveResonance.init_train!Method
init_train!(
    x::AbstractVector{T} where T<:Real,
    art::ARTModule,
    preprocessed::Bool
) -> AbstractVector{T} where T<:Real

Summary

Initializes the module for training in a single iteration.

The purpose of this function is mainly to handle the conditions of complement coding. Fails if the module was incorrectly set up or if the module was not setup and the data was not preprocessed.

Arguments

  • x::RealVector: the sample used for initialization.
  • art::ARTModule: the ART/ARTMAP module that will be trained on the sample.
  • preprocessed::Bool: a required flag for if the sample has already been complement coded and normalized.

Method List / Definition Locations

init_train!(x, art, preprocessed)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:470.

source
AdaptiveResonance.initialize!Method

Summary

Initializes the ART module for training with sample 'x' and optional label 'y', setting up the data configuration and instantiating the first category.

This function is used during the first training iteration when the ART module is empty.

Arguments

  • art::ART: the ART module to initialize.
  • x::RealVector: the sample to use for initialization.
  • y::Integer=0: the optional new label for the first weight of the ART module. If not specified, defaults the new label to 1.

Examples

julia> my_FuzzyART = FuzzyART()
FuzzyART
    opts: opts_FuzzyART
    ...
julia> initialize!(my_FuzzyART, [1, 2, 3, 4])


# Method List / Definition Locations

julia initialize!(art, x; y) ```

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/common.jl:22.

source
AdaptiveResonance.initialize!Method

Summary

Initializes the supervised ARTMAP module for training with sample 'x' and label 'y', setting up the data configuration and instantiating the first category.

Arguments

  • art::ARTMAP: the ARTMAP module to initialize.
  • x::RealVector: the sample to use for initialization.
  • y::Integer: the initial supervised label.

Examples

julia> my_sfam = SFAM()
SFAM
    opts: opts_SFAM
    ...
julia> initialize!(my_SFAM, [1, 2, 3, 4])


# Method List / Definition Locations

julia initialize!(art, x, y) ```

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/SFAM.jl:197.

source
AdaptiveResonance.log_art_stats!Method
log_art_stats!(art::ARTModule, bmu::Integer, mismatch::Bool)

Summary

Logs common statistics of an ART module after a training/classification iteration.

Arguments

  • art::ARTModule: the ART module that just underwent training/classification.
  • bmu::Integer: the best-matching unit integer index.
  • mismatch::Bool: flag of whether there was a mismatch in this iteration.

Method List / Definition Locations

log_art_stats!(art, bmu, mismatch)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:160.

source
AdaptiveResonance.replace_mat_index!Method
replace_mat_index!(
    mat::AbstractMatrix{T} where T<:Real,
    vec::AbstractVector{T} where T<:Real,
    index::Integer
) -> AbstractVector{T} where T<:Real

Summary

Replaces a matrix element with a vector at the column index.

This function dispatches to the low-level replacement strategy.

Arguments

  • mat::RealMatrix: the matrix to update with a replaced column vector.
  • vec::RealVector: the vector to put in the matrix at the column index.
  • index::Integer: the column index to put the vector.

Method List / Definition Locations

replace_mat_index!(mat, vec, index)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/subroutines.jl:19.

source
AdaptiveResonance.set_threshold!Method

Summary

Sets the match threshold of the ART/ARTMAP module as a function of the vigilance parameter.

Depending on selected ART/ARTMAP module and its options, this may be a function of other parameters as well.

Arguments

  • art::ARTModule: the ART/ARTMAP module for setting a new threshold.

Method List / Definition Locations

set_threshold!(art)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:254.

set_threshold!(art)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:223.

set_threshold!(art)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:258.

source
AdaptiveResonance.similarityMethod
similarity(
    method::Symbol,
    F2::FuzzyART,
    sample::AbstractVector{T} where T<:Real,
    activation::Bool
) -> Any

Summary

Compute the similarity metric depending on method with explicit comparisons for the field name.

Arguments

  • method::Symbol: the linkage method to use.

  • F2::FuzzyART: the DDVFA FuzzyART F2 node to compute the linkage method within.

  • sample::RealVector: the sample to use for computing the linkage to the F2 module.

  • activation::Bool: flag to use the activation function. False uses the match function.

Method List / Definition Locations

similarity(method, F2, sample, activation)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:438.

source
AdaptiveResonance.unsafe_replace_mat_index!Method
unsafe_replace_mat_index!(
    mat::AbstractMatrix{T} where T<:Real,
    vec::AbstractVector{T} where T<:Real,
    index::Integer
) -> AbstractVector{T} where T<:Real

Summary

Low-level function for unsafely replacing a matrix column with a given vector.

Arguments

  • mat::RealMatrix: the matrix to update with a replaced column vector.
  • vec::RealVector: the vector to put in the matrix at the column index.
  • index::Integer: the column index to put the vector.

Method List / Definition Locations

unsafe_replace_mat_index!(mat, vec, index)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/subroutines.jl:28.

source
AdaptiveResonance.update_iterMethod
update_iter(
    art::ARTModule,
    iter::Union{ProgressBars.ProgressBar, UnitRange},
    i::Integer
) -> Union{Nothing, String}

Summary

Updates the iteration of the ART/ARTMAP module, training or inference, according to its display settings.

Arguments

  • art::ARTModule: the ART/ARTMAP module being iterated upon.
  • iter::ARTIterator: the iterator object used in the training/inference loop.
  • i::Integer: the iteration during training/inference that the iterator should be updated to.

Method List / Definition Locations

update_iter(art, iter, i)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:436.

source