Index
This page lists the core methods and types of the AdaptiveResonance.jl
package. The Modules section lists the modules exported by the package including the AdaptiveResonance
module itself. The Methods section lists the public methods for the package that use the modules in Types. Each of these entries link to the docstrings in the Docs section.
ART modules document their internal working parameters and references, while their hyperparameters/options are documented under their corresponding option structs opts_...
.
Index
This section enumerates the names exported by the package, each of which links to its corresponding Documentation.
Modules
Methods
AdaptiveResonance.DAM
AdaptiveResonance.DAM
AdaptiveResonance.GammaNormalizedFuzzyART
AdaptiveResonance.GammaNormalizedFuzzyART
AdaptiveResonance.artscene_filter
AdaptiveResonance.classify
AdaptiveResonance.classify
AdaptiveResonance.complement_code
AdaptiveResonance.data_setup!
AdaptiveResonance.data_setup!
AdaptiveResonance.get_W
AdaptiveResonance.get_data_characteristics
AdaptiveResonance.linear_normalization
AdaptiveResonance.linear_normalization
AdaptiveResonance.opts_DAM
AdaptiveResonance.opts_GammaNormalizedFuzzyART
AdaptiveResonance.performance
AdaptiveResonance.train!
AdaptiveResonance.train!
AdaptiveResonance.train!
AdaptiveResonance.train!
Types
AdaptiveResonance.ART
AdaptiveResonance.ARTMAP
AdaptiveResonance.ARTModule
AdaptiveResonance.ARTOpts
AdaptiveResonance.DDVFA
AdaptiveResonance.DDVFA
AdaptiveResonance.DDVFA
AdaptiveResonance.DVFA
AdaptiveResonance.DVFA
AdaptiveResonance.DVFA
AdaptiveResonance.DataConfig
AdaptiveResonance.DataConfig
AdaptiveResonance.DataConfig
AdaptiveResonance.DataConfig
AdaptiveResonance.DataConfig
AdaptiveResonance.FAM
AdaptiveResonance.FAM
AdaptiveResonance.FAM
AdaptiveResonance.FuzzyART
AdaptiveResonance.FuzzyART
AdaptiveResonance.FuzzyART
AdaptiveResonance.FuzzyART
AdaptiveResonance.SFAM
AdaptiveResonance.SFAM
AdaptiveResonance.SFAM
AdaptiveResonance.opts_DDVFA
AdaptiveResonance.opts_DVFA
AdaptiveResonance.opts_FAM
AdaptiveResonance.opts_FuzzyART
AdaptiveResonance.opts_SFAM
Constants
AdaptiveResonance.ACTIVATION_FUNCTIONS
AdaptiveResonance.ADAPTIVERESONANCE_MODULES
AdaptiveResonance.ADAPTIVERESONANCE_VERSION
AdaptiveResonance.ARTMAP_MODULES
AdaptiveResonance.ART_MODULES
AdaptiveResonance.DDVFA_METHODS
AdaptiveResonance.MATCH_FUNCTIONS
AdaptiveResonance.UPDATE_FUNCTIONS
Docs
This section lists the documentation for every exported name of the AdaptiveResonance.jl
package.
Modules
AdaptiveResonance.AdaptiveResonance
— ModuleMain module for AdaptiveResonance.jl
, a Julia package of adaptive resonance theory algorithms.
This module exports all of the ART modules, options, and utilities used by the AdaptiveResonance.jl package.
For full usage, see the official guide at https://ap6yc.github.io/AdaptiveResonance.jl/dev/man/guide/.
Basic Usage
Install and import the package in a script with
using Pkg
Pkg.add("AdaptiveResonance")
using AdaptiveResonance
then create an ART module with default options
my_art = DDVFA()
or custom options via keyword arguments
my_art = DDVFA(rho_ub=0.45, rho_ub=0.7)
Train all models with train!
and conduct inference with classify
. In batch, samples are interpreted in the Julia column-major fashion with dimensions (n_dim, n_samples)
(i.e., columns are samples).
Train unsupervised ART modules incrementally or in batch with optional labels as a keyword argument y
# Load your data somehow
samples, labels = load_some_data()
# Unsupervised batch
train!(my_art, samples)
# Supervised batch
train!(my_art, samples, y=labels)
# Unsupervised incremental
for ix in eachindex(labels)
train!(my_art, samples[:, ix])
end
# Supervised incremental
for ix in eachindex(labels)
train!(my_art, samples[:, ix], y=labels[ix])
end
Train supervised ARTMAP with positional arguments
my_artmap = SFAM()
train!(my_artmap, samples, labels)
With either module, conduct inference with classify(art, samples)
# Batch inference
y_hat = classify(my_art, test_samples)
# Incremental inference
for ix in eachindex(test_labels)
y_hat[ix] = classify(my_artmap, test_samples[:, ix])
end
Imports
The following names are imported by the package as dependencies:
Base
Core
Distributed
DocStringExtensions
ElasticArrays
Logging
NumericalTypeAliases
Parameters
Pkg
ProgressBars
SharedArrays
Exports
The following names are exported and available when using
the package:
ACTIVATION_FUNCTIONS
ADAPTIVERESONANCE_MODULES
ADAPTIVERESONANCE_VERSION
ART
ARTMAP
ARTMAP_MODULES
ARTModule
ARTOpts
ART_MODULES
DAM
DDVFA
DDVFA_METHODS
DVFA
DataConfig
FAM
FuzzyART
GammaNormalizedFuzzyART
MATCH_FUNCTIONS
SFAM
UPDATE_FUNCTIONS
artscene_filter
classify
complement_code
data_setup!
get_W
get_data_characteristics
linear_normalization
opts_DAM
opts_DDVFA
opts_DVFA
opts_FAM
opts_FuzzyART
opts_GammaNormalizedFuzzyART
opts_SFAM
performance
train!
Functions
AdaptiveResonance.DAM
— MethodDAM(opts::opts_SFAM) -> SFAM
Summary
Implements a Default ARTMAP module with specified options.
Default ARTMAP is a variant of SFAM, using the AdaptiveResonance.opts_SFAM
options. This constructor sets the activation to :choice_by_difference
in addition to the keyword argument options you provide.
Arguments
opts::opts_SFAM
: the Simplified FuzzyARTMAP options (seeAdaptiveResonance.opts_SFAM
).
Method List / Definition Locations
DAM(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/variants.jl:41
.
AdaptiveResonance.DAM
— MethodDAM(; kwargs...) -> SFAM
Summary
Constructs a Default ARTMAP module using a SFAM module using Default ARTMAP's choice-by-difference activation function.
Default ARTMAP is a variant of SFAM, using the AdaptiveResonance.opts_SFAM
options. This constructor sets the activation to :choice_by_difference
in addition to the keyword argument options you provide.
Arguments
kwargs
: keyword arguments of Simplified FuzzyARTMAP options (seeAdaptiveResonance.opts_SFAM
)
References:
- G. P. Amis and G. A. Carpenter, 'Default ARTMAP 2,' IEEE Int. Conf. Neural Networks - Conf. Proc., vol. 2, no. September 2007, pp. 777-782, Mar. 2007, doi: 10.1109/IJCNN.2007.4371056.
Method List / Definition Locations
DAM(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/variants.jl:29
.
AdaptiveResonance.GammaNormalizedFuzzyART
— MethodGammaNormalizedFuzzyART(opts::opts_FuzzyART)
Summary
Implements a Gamma-Normalized FuzzyART module with specified options.
GammaNormalizedFuzzyART is a variant of FuzzyART
, using the AdaptiveResonance.opts_FuzzyART
options. This constructor passes gamma_normalization=true
, which internally uses match=:gamma_match
and activation=:gamma_activation
in addition to the keyword argument options you provide.
Arguments
opts::opts_FuzzyART
: the Fuzzy ART options (seeAdaptiveResonance.opts_FuzzyART
).
Method List / Definition Locations
GammaNormalizedFuzzyART(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/variants.jl:39
.
AdaptiveResonance.GammaNormalizedFuzzyART
— MethodGammaNormalizedFuzzyART(; kwargs...) -> FuzzyART
Summary
Constructs a Gamma-Normalized FuzzyART module as a variant of FuzzyART by using the gamma_normalization option.
GammaNormalizedFuzzyART is a variant of FuzzyART
, using the AdaptiveResonance.opts_FuzzyART
options. This constructor passes gamma_normalization=true
, which internally uses match=:gamma_match
and activation=:gamma_activation
in addition to the keyword argument options you provide.
Arguments
kwargs
: keyword arguments of FuzzyART options (seeAdaptiveResonance.opts_FuzzyART
)
Method List / Definition Locations
GammaNormalizedFuzzyART(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/variants.jl:26
.
AdaptiveResonance.artscene_filter
— Methodartscene_filter(
raw_image::Array{T<:AbstractFloat, 3}
) -> Tuple{Array{Float64, 4}, Array{Float64, 3}}
Summary
Process the full artscene filter toolchain on an image.
Arguments
raw_image::Array{Real, 3}
: the raw RGB image to process with the ARTSCENE filter.
Method List / Definition Locations
artscene_filter(raw_image)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/ARTSCENE.jl:294
.
AdaptiveResonance.classify
— Methodclassify(
art::ARTModule,
x::AbstractMatrix{T} where T<:Real;
preprocessed,
get_bmu
) -> Any
Summary
Predict categories of 'x' using the ART model.
Returns predicted categories 'y_hat.'
Arguments
art::ARTModule
: ART or ARTMAP module to use for batch inference.x::RealMatrix
: the 2-D dataset containing columns of samples with rows of features.preprocessed::Bool=false
: flag, if the data has already been complement coded or not.get_bmu::Bool=false
, flag, if the model should return the best-matching-unit label in the case of total mismatch.
Examples
julia> my_DDVFA = DDVFA()
DDVFA
opts: opts_DDVFA
...
julia> x, y = load_data()
julia> train!(my_DDVFA, x)
julia> y_hat = classify(my_DDVFA, y)
Method List / Definition Locations
classify(art, x; preprocessed, get_bmu)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:554
.
AdaptiveResonance.classify
— MethodSummary
Predict categories of a single sample of features 'x' using the ART model.
Returns predicted category 'y_hat.'
Arguments
art::ARTModule
: ART or ARTMAP module to use for batch inference.x::RealVector
: the single sample of features to classify.preprocessed::Bool=false
: optional, flag if the data has already been complement coded or not.get_bmu::Bool=false
: optional, flag if the model should return the best-matching-unit label in the case of total mismatch.
Method List / Definition Locations
classify(art, x; preprocessed, get_bmu)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:362
.
classify(art, x; preprocessed, get_bmu)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:360
.
classify(art, x; preprocessed, get_bmu)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:392
.
classify(art, x; preprocessed, get_bmu)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/SFAM.jl:315
.
AdaptiveResonance.complement_code
— Methodcomplement_code(
data::AbstractArray{T} where T<:Real;
config
) -> Any
Summary
Normalizes the data x to [0, 1] and returns the augmented vector [x, 1 - x].
Arguments
data::RealArray
: the 1-D or 2-D data to be complement coded.config::DataConfig=DataConfig()
: the data configuration for the ART/ARTMAP module.
Method List / Definition Locations
complement_code(data; config)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:402
.
AdaptiveResonance.data_setup!
— Methoddata_setup!(
art::ARTModule,
data::AbstractMatrix{T} where T<:Real
)
Summary
Convenience method for setting up the DataConfig of an ART module in advance.
Arguments
art::ARTModule
: the ART/ARTMAP module to manually configure the data config for.data::RealArray
: the 2-D batch of data used to create the data config.
Method List / Definition Locations
data_setup!(art, data)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:295
.
AdaptiveResonance.data_setup!
— Methoddata_setup!(
config::DataConfig,
data::AbstractMatrix{T} where T<:Real
)
Summary
Sets up the data config for the ART module before training.
This function crucially gets the original and complement-coded dimensions of the data, and it infers the bounds of the data (minimums and maximums) by the largest and smallest values along each feature dimension.
Arguments
config::DataConfig
: the ART/ARTMAP module's data configuration object.data::RealMatrix
: the 2-D batch of data to use for creating the data configuration.
Method List / Definition Locations
data_setup!(config, data)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:268
.
AdaptiveResonance.get_W
— Methodget_W(art::DDVFA) -> Vector
Summary
Convenience function; return a concatenated array of all DDVFA weights.
Arguments
art::DDVFA
: the DDVFA module to get all of the weights from as a list.
Method List / Definition Locations
get_W(art)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:591
.
AdaptiveResonance.get_data_characteristics
— Methodget_data_characteristics(
data::AbstractMatrix{T} where T<:Real;
config
) -> NTuple{4, Any}
Summary
Get the characteristics of the data, taking account if a data config is passed.
If no DataConfig is passed, then the data characteristics come from the array itself. Otherwise, use the config for the statistics of the data and the data array for the number of samples.
Arguments
data::RealMatrix
: the 2-D data to be complement coded.config::DataConfig=DataConfig()
: the data configuration for the ART/ARTMAP module.
Method List / Definition Locations
get_data_characteristics(data; config)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:310
.
AdaptiveResonance.linear_normalization
— Methodlinear_normalization(
data::AbstractMatrix{T} where T<:Real;
config
) -> Any
Summary
Normalize the data to the range [0, 1] along each feature.
Arguments
data::RealMatrix
: the 2-D batch of data to normalize.config::DataConfig=DataConfig()
: the data configuration from the ART/ARTMAP module.
Method List / Definition Locations
linear_normalization(data; config)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:369
.
AdaptiveResonance.linear_normalization
— Methodlinear_normalization(
data::AbstractVector{T} where T<:Real;
config
) -> Vector{Float64}
Summary
Normalize the data to the range [0, 1] along each feature.
Arguments
data::RealVector
: the 1-D sample of data to normalize.config::DataConfig=DataConfig()
: the data configuration from the ART/ARTMAP module.
Method List / Definition Locations
linear_normalization(data; config)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:339
.
AdaptiveResonance.opts_DAM
— Methodopts_DAM(; kwargs...) -> opts_SFAM
Summary
Implements a Default ARTMAP module's options.
Default ARTMAP is a variant of SFAM, using the AdaptiveResonance.opts_SFAM
options. This constructor sets the activation to :choice_by_difference
in addition to the keyword argument options you provide.
These options are a Parameters.jl
struct, taking custom options keyword arguments. Each field has a default value listed below.
Method List / Definition Locations
opts_DAM(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/variants.jl:52
.
AdaptiveResonance.opts_GammaNormalizedFuzzyART
— Methodopts_GammaNormalizedFuzzyART(; kwargs...)
Summary
Implements a Gamma-Normalized FuzzyART module's options.
GammaNormalizedFuzzyART is a variant of FuzzyART
, using the AdaptiveResonance.opts_FuzzyART
options. This constructor passes gamma_normalization=true
, which internally uses match=:gamma_match
and activation=:gamma_activation
in addition to the keyword argument options you provide.
These options are a Parameters.jl
struct, taking custom options keyword arguments. Each field has a default value listed below.
Method List / Definition Locations
opts_GammaNormalizedFuzzyART(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/variants.jl:50
.
AdaptiveResonance.performance
— Methodperformance(
y_hat::AbstractVector{T} where T<:Integer,
y::AbstractVector{T} where T<:Integer
) -> Any
Summary
Convenience function to get the categorization performance of y_hat against y.
Arguments
y_hat::IntegerVector
: the estimated labels.y::IntegerVector
: the true labels.
Method List / Definition Locations
performance(y_hat, y)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:200
.
AdaptiveResonance.train!
— Functiontrain!(
art::ARTMAP,
x::AbstractMatrix{T} where T<:Real,
y::AbstractVector{T} where T<:Integer
) -> Any
train!(
art::ARTMAP,
x::AbstractMatrix{T} where T<:Real,
y::AbstractVector{T} where T<:Integer,
preprocessed::Bool
) -> Any
Summary
train!(art::ARTMAP, x::RealMatrix, y::IntegerVector, preprocessed::Bool=false)
Train the ARTMAP model on a batch of data 'x' with supervisory labels 'y.'
Arguments
art::ARTMAP
: the supervised ARTMAP model to train.x::RealMatrix
: the 2-D dataset containing columns of samples with rows of features.y::IntegerVector
: labels for supervisory training.preprocessed::Bool=false
: flag, if the data has already been complement coded or not.
Method List / Definition Locations
train!(art, x, y)
train!(art, x, y, preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/common.jl:23
.
AdaptiveResonance.train!
— Methodtrain!(
art::ART,
x::AbstractMatrix{T} where T<:Real;
y,
preprocessed
) -> Any
Summary
Train the ART model on a batch of data 'x' with optional supervisory labels 'y.'
Arguments
art::ART
: the unsupervised ART model to train.x::RealMatrix
: the 2-D dataset containing columns of samples with rows of features.y::IntegerVector=Int[]
: optional, labels for simple supervisory training.preprocessed::Bool=false
: optional, flag if the data has already been complement coded or not.
Method List / Definition Locations
train!(art, x; y, preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/common.jl:21
.
AdaptiveResonance.train!
— MethodSummary
Train the ART model on a single sample of features 'x' with an optional supervisory label.
Arguments
art::ART
: the unsupervised ART model to train.x::RealVector
: the single sample feature vector to train upon.y::Integer=0
: optional, a label for simple supervisory training.preprocessed::Bool=false
: optional, flag if the data has already been complement coded or not.
Method List / Definition Locations
train!(art, x; y, preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:275
.
train!(art, x; y, preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:268
.
train!(art, x; y, preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:300
.
AdaptiveResonance.train!
— MethodSummary
Train the supervised ARTMAP model on a single sample of features 'x' with supervisory label 'y'.
Arguments
art::ARTMAP
: the supervised ART model to train.x::RealVector
: the single sample feature vector to train upon.y::Integer
: the label for supervisory training.preprocessed::Bool=false
: optional, flag if the data has already been complement coded or not.
Method List / Definition Locations
train!(art, x, y; preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/SFAM.jl:235
.
Types
AdaptiveResonance.ART
— Typeabstract type ART <: ARTModule
Summary
Abstract supertype for all default unsupervised ART modules.
Fields
AdaptiveResonance.ARTMAP
— Typeabstract type ARTMAP <: ARTModule
Summary
Abstract supertype for all supervised ARTMAP modules.
Fields
AdaptiveResonance.ARTModule
— Typeabstract type ARTModule
Summary
Abstract supertype for both ART (unsupervised) and ARTMAP (supervised) modules.
Fields
AdaptiveResonance.ARTOpts
— Typeabstract type ARTOpts
Summary
Abstract supertype for all ART module options.
Fields
AdaptiveResonance.DDVFA
— Typemutable struct DDVFA <: ART
Summary
Distributed Dual Vigilance Fuzzy ARTMAP module struct.
For module options, see AdaptiveResonance.opts_DDVFA
.
References
- 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.
- 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{Float64}
: DDVFA activation values.
M::Vector{Float64}
: 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.
AdaptiveResonance.DDVFA
— MethodDDVFA(opts::opts_DDVFA) -> DDVFA
Summary
Implements a DDVFA learner with specified options.
Arguments
opts::opts_DDVFA
: the DDVFA options (seeAdaptiveResonance.opts_DDVFA
).
Examples
julia> my_opts = opts_DDVFA()
julia> DDVFA(my_opts)
DDVFA
opts: opts_DDVFA
subopts: opts_FuzzyART
...
Method List / Definition Locations
DDVFA(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:227
.
AdaptiveResonance.DDVFA
— MethodDDVFA(; kwargs...) -> DDVFA
Summary
Implements a DDVFA learner with optional keyword arguments.
Arguments
kwargs
: keyword arguments to pass to the DDVFA options struct (seeAdaptiveResonance.opts_DDVFA
.)
Examples
By default:
julia> DDVFA()
DDVFA
opts: opts_DDVFA
subopts: opts_FuzzyART
...
or with keyword arguments:
julia> DDVFA(rho_lb=0.4, rho_ub = 0.75)
DDVFA
opts: opts_DDVFA
subopts: opts_FuzzyART
...
Method List / Definition Locations
DDVFA(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/distributed/modules/DDVFA.jl:206
.
AdaptiveResonance.DVFA
— Typemutable struct DVFA <: AdaptiveResonance.AbstractFuzzyART
Summary
Dual Vigilance Fuzzy ARTMAP module struct.
For module options, see AdaptiveResonance.opts_DVFA
.
References:
- L. E. Brito da Silva, I. Elnabarawy and D. C. Wunsch II, 'Dual Vigilance Fuzzy ART,' Neural Networks Letters. To appear.
- 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_DVFA
: DVFA options struct.
config::DataConfig
: Data configuration struct.
threshold_ub::Float64
: Operating upper bound module threshold value, a function of the upper bound vigilance parameter.
threshold_lb::Float64
: Operating lower bound module threshold value, a function of the lower bound vigilance parameter.
labels::Vector{Int64}
: Incremental list of labels corresponding to each F2 node, self-prescribed or supervised.
W::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}
: Category weight matrix.
T::Vector{Float64}
: Activation values for every weight for a given sample.
M::Vector{Float64}
: Match values for every weight for a given sample.
n_categories::Int64
: Number of category weights (F2 nodes).
n_clusters::Int64
: Number of labeled clusters, may be lower thann_categories
epoch::Int64
: Current training epoch.
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.
AdaptiveResonance.DVFA
— MethodDVFA(opts::opts_DVFA) -> DVFA
Summary
Implements a DVFA learner with specified options.
Arguments
opts::opts_DVFA
: the DVFA options (seeAdaptiveResonance.opts_DVFA
).
Examples
julia> my_opts = opts_DVFA()
julia> DVFA(my_opts)
DVFA
opts: opts_DVFA
...
Method List / Definition Locations
DVFA(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:209
.
AdaptiveResonance.DVFA
— MethodDVFA(; kwargs...) -> DVFA
Summary
Implements a DVFA learner with optional keyword arguments.
Arguments
kwargs
: keyword arguments to pass to the DVFA options struct (seeAdaptiveResonance.opts_DVFA
.)
Examples
By default:
julia> DVFA()
DVFA
opts: opts_DVFA
...
or with keyword arguments:
julia> DVFA(rho=0.7)
DVFA
opts: opts_DVFA
...
Method List / Definition Locations
DVFA(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/DVFA.jl:189
.
AdaptiveResonance.DataConfig
— Typemutable struct DataConfig
Summary
Container to standardize training/testing data configuration.
This container declares if a data configuration has been setup, what the original and complement coded dimensions are, and what the minimums and maximums of the values along each feature dimension are.
Fields
setup::Bool
: Flag if data has been setup yet or not.
mins::Vector{Float64}
: List of minimum values for each feature.
maxs::Vector{Float64}
: List of maximum values for each feature.
dim::Int64
: Dimensionality of the feature vectors (i.e., number of features).
dim_comp::Int64
: Complement coded feature dimensionality, twice the size ofdim
.
AdaptiveResonance.DataConfig
— MethodDataConfig(
data::AbstractMatrix{T} where T<:Real
) -> DataConfig
Summary
Convenience constructor for DataConfig, requiring only the data matrix.
Arguments
data::RealMatrix
: the 2-D batch of data to be used for inferring the data configuration.
Method List / Definition Locations
DataConfig(data)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:120
.
AdaptiveResonance.DataConfig
— MethodDataConfig(
mins::AbstractVector{T} where T<:Real,
maxs::AbstractVector{T} where T<:Real
) -> DataConfig
Summary
Convenience constructor for DataConfig, requiring only mins and maxs of the features.
This constructor is used when the mins and maxs differ across features. The dimension is inferred by the length of the mins and maxs.
Arguments
mins::RealVector
: a vector of minimum values for each feature dimension.maxs::RealVector
: a vector of maximum values for each feature dimension.
Method List / Definition Locations
DataConfig(mins, maxs)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:79
.
AdaptiveResonance.DataConfig
— MethodDataConfig(min::Real, max::Real, dim::Integer) -> DataConfig
Summary
Convenience constructor for DataConfig, requiring only a global min, max, and dim.
This constructor is used in the case that the feature mins and maxs are all the same respectively.
Arguments
min::Real
: the minimum value across all features.max::Real
: the maximum value across all features.dim::Integer
: the dimension of the features, which must be provided because it cannot be inferred from just the minimum or maximum values.
Method List / Definition Locations
DataConfig(min, max, dim)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:104
.
AdaptiveResonance.DataConfig
— MethodDataConfig() -> DataConfig
Summary
Default constructor for a data configuration, not set up.
Method List / Definition Locations
DataConfig()
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/lib/common.jl:60
.
AdaptiveResonance.FAM
— Typemutable struct FAM <: ARTMAP
Summary
Fuzzy ARTMAP struct.
For module options, see AdaptiveResonance.opts_FAM
.
References
- G. A. Carpenter, S. Grossberg, N. Markuzon, J. H. Reynolds, and D. B. Rosen, “Fuzzy ARTMAP: A Neural Network Architecture for Incremental Supervised Learning of Analog Multidimensional Maps,” IEEE Trans. Neural Networks, vol. 3, no. 5, pp. 698-713, 1992, doi: 10.1109/72.159059.
Fields
opts::opts_FAM
: Fuzzy ARTMAP options struct.
config::DataConfig
: Data configuration struct.
W::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}
: Category weight matrix.
labels::Vector{Int64}
: Incremental list of labels corresponding to each F2 node, self-prescribed or supervised.
n_categories::Int64
: Number of category weights (F2 nodes).
epoch::Int64
: Current training epoch.
AdaptiveResonance.FAM
— MethodFAM(opts::opts_FAM) -> FAM
Summary
Implements a Fuzzy ARTMAP learner with specified options.
Examples
julia> opts = opts_FAM()
julia> FAM(opts)
FAM
opts: opts_FAM
...
Method List / Definition Locations
FAM(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/FAM.jl:146
.
AdaptiveResonance.FAM
— MethodFAM(; kwargs...) -> FAM
Summary
Implements a Fuzzy ARTMAP learner with optional keyword arguments.
Examples
By default:
julia> FAM()
FAM
opts: opts_FAM
...
or with keyword arguments:
julia> FAM(rho=0.7)
FAM
opts: opts_FAM
...
Method List / Definition Locations
FAM(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/FAM.jl:129
.
AdaptiveResonance.FuzzyART
— Typemutable struct FuzzyART <: AdaptiveResonance.AbstractFuzzyART
Summary
Gamma-Normalized Fuzzy ART learner struct
For module options, see AdaptiveResonance.opts_FuzzyART
.
References
- 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_FuzzyART
: FuzzyART options struct.
config::DataConfig
: Data configuration struct.
threshold::Float64
: Operating module threshold value, a function of the vigilance parameter.
labels::Vector{Int64}
: Incremental list of labels corresponding to each F2 node, self-prescribed or supervised.
T::Vector{Float64}
: Activation values for every weight for a given sample.
M::Vector{Float64}
: Match values for every weight for a given sample.
W::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}
: Category weight matrix.
n_instance::Vector{Int64}
: Number of weights associated with each category.
n_categories::Int64
: Number of category weights (F2 nodes).
epoch::Int64
: Current training epoch.
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.
AdaptiveResonance.FuzzyART
— MethodFuzzyART(
opts::opts_FuzzyART,
sample::AbstractVector{T} where T<:Real;
preprocessed
) -> FuzzyART
Summary
Create and initialize a FuzzyART with a single sample in one step.
Principally used as a method for initialization within DDVFA.
Arguments
opts::opts_FuzzyART
: the FuzzyART options contains.sample::RealVector
: the sample to use as a basis for setting up the FuzzyART.preprocessed::Bool=false
: flag for if the sample is already complement coded and normalized.
Method List / Definition Locations
FuzzyART(opts, sample; preprocessed)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:247
.
AdaptiveResonance.FuzzyART
— MethodFuzzyART(opts::opts_FuzzyART) -> FuzzyART
Summary
Implements a Fuzzy ART learner with specified options.
Arguments
opts::opts_FuzzyART
: the FuzzyART options struct with specified options (seeAdaptiveResonance.opts_FuzzyART
).
Examples
julia> FuzzyART(opts)
FuzzyART
opts: opts_FuzzyART
...
Method List / Definition Locations
FuzzyART(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:214
.
AdaptiveResonance.FuzzyART
— MethodFuzzyART(; kwargs...) -> FuzzyART
Summary
Implements a Fuzzy ART learner with optional keyword arguments.
Arguments
kwargs
: keyword arguments of FuzzyART options (seeAdaptiveResonance.opts_FuzzyART
).
Examples
By default:
julia> FuzzyART()
FuzzyART
opts: opts_FuzzyART
...
or with keyword arguments:
julia> FuzzyART(rho=0.7)
FuzzyART
opts: opts_FuzzyART
...
Method List / Definition Locations
FuzzyART(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/FuzzyART.jl:192
.
AdaptiveResonance.SFAM
— Typemutable struct SFAM <: ARTMAP
Summary
Simple Fuzzy ARTMAP struct.
For module options, see AdaptiveResonance.opts_SFAM
.
References
- G. A. Carpenter, S. Grossberg, N. Markuzon, J. H. Reynolds, and D. B. Rosen, “Fuzzy ARTMAP: A Neural Network Architecture for Incremental Supervised Learning of Analog Multidimensional Maps,” IEEE Trans. Neural Networks, vol. 3, no. 5, pp. 698-713, 1992, doi: 10.1109/72.159059.
Fields
opts::opts_SFAM
: Simplified Fuzzy ARTMAP options struct.
config::DataConfig
: Data configuration struct.
W::ElasticArrays.ElasticMatrix{Float64, V} where V<:DenseVector{Float64}
: Category weight matrix.
labels::Vector{Int64}
: Incremental list of labels corresponding to each F2 node, self-prescribed or supervised.
n_categories::Int64
: Number of category weights (F2 nodes).
epoch::Int64
: Current training epoch.
T::Vector{Float64}
: DDVFA activation values.
M::Vector{Float64}
: 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.
AdaptiveResonance.SFAM
— MethodSFAM(opts::opts_SFAM) -> SFAM
Summary
Implements a Simple Fuzzy ARTMAP learner with specified options.
Arguments
opts::opts_SFAM
: the Simple Fuzzy ARTMAP options (seeAdaptiveResonance.opts_SFAM
).
Examples
julia> opts = opts_SFAM()
julia> SFAM(opts)
SFAM
opts: opts_SFAM
...
Method List / Definition Locations
SFAM(opts)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/SFAM.jl:186
.
AdaptiveResonance.SFAM
— MethodSFAM(; kwargs...) -> SFAM
Summary
Implements a Simple Fuzzy ARTMAP learner with optional keyword arguments.
Arguments
kwargs
: keyword arguments to pass to the Simple Fuzzy ARTMAP options struct (seeAdaptiveResonance.opts_SFAM
.)
Examples
By default:
julia> SFAM()
SFAM
opts: opts_SFAM
...
or with keyword arguments:
julia> SFAM(rho=0.6)
SFAM
opts: opts_SFAM
...
Method List / Definition Locations
SFAM(; kwargs...)
defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ARTMAP/SFAM.jl:166
.
AdaptiveResonance.opts_DDVFA
— Typemutable struct opts_DDVFA <: ARTOpts
Summary
Distributed Dual Vigilance Fuzzy ART 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.7rho_ub::Float64
: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.85alpha::Float64
: Choice parameter: alpha > 0. Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0gamma::Float64
: Pseudo kernel width: gamma >= 1. Default: 3.0gamma_ref::Float64
: Reference gamma for normalization: 0 <= gamma_ref < gamma. Default: 1.0similarity::Symbol
: Similarity method (activation and match): similarity ∈ [:single, :average, :complete, :median, :weighted, :centroid]. Default: :singlemax_epoch::Int64
: Maximum number of epochs during training: max_epochs ∈ (1, Inf). Default: 1display::Bool
: Display flag for progress bars. Default: falsegamma_normalization::Bool
: Flag to normalize the threshold by the feature dimension. Default: trueuncommitted::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_activationmatch::Symbol
: Selected match function. Default: :gamma_matchupdate::Symbol
: Selected weight update function. Default: :basic_updatesort::Bool
: Flag to sort the F2 nodes by activation before the match phaseWhen true, the F2 nodes are sorted by activation before match. When false, an iterative argmax and inhibition procedure is used to find the best-matching unit. Default: false
AdaptiveResonance.opts_DVFA
— Typemutable struct opts_DVFA <: ARTOpts
Summary
Dual Vigilance Fuzzy ART 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.55rho_ub::Float64
: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.75alpha::Float64
: Choice parameter: alpha > 0. Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0max_epoch::Int64
: Maximum number of epochs during training. Default: 1display::Bool
: Display flag for progress bars. Default: falseuncommitted::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: :basic_activationmatch::Symbol
: Selected match function. Default: :unnormalized_matchupdate::Symbol
: Selected weight update function. Default: :basic_updatesort::Bool
: Flag to sort the F2 nodes by activation before the match phaseWhen true, the F2 nodes are sorted by activation before match. When false, an iterative argmax and inhibition procedure is used to find the best-matching unit. Default: false
AdaptiveResonance.opts_FAM
— Typemutable struct opts_FAM <: ARTOpts
Summary
Implements a Fuzzy ARTMAP learner's options.
These options are a Parameters.jl
struct, taking custom options keyword arguments. Each field has a default value listed below.
Fields
rho::Float64
: Vigilance parameter: rho ∈ [0, 1]. Default: 0.6alpha::Float64
: Choice parameter: alpha > 0. Default: 1.0e-7epsilon::Float64
: Match tracking parameter: epsilon ∈ (0, 1). Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0max_epochs::Int64
: Maximum number of epochs during training: max_epochs ∈ [1, Inf) Default: 1uncommitted::Bool
: Uncommitted node flag. Default: truedisplay::Bool
: Display flag for progress bars. Default: falsesort::Bool
: Flag to sort the F2 nodes by activation before the match phaseWhen true, the F2 nodes are sorted by activation before match. When false, an iterative argmax and inhibition procedure is used to find the best-matching unit. Default: false
AdaptiveResonance.opts_FuzzyART
— Typemutable struct opts_FuzzyART <: ARTOpts
Summary
Gamma-Normalized Fuzzy ART options struct.
These options are a Parameters.jl
struct, taking custom options keyword arguments. Each field has a default value listed below.
Fields
rho::Float64
: Vigilance parameter: rho ∈ [0, 1]. Default: 0.6alpha::Float64
: Choice parameter: alpha > 0. Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0gamma::Float64
: Pseudo kernel width: gamma >= 1. Default: 3.0gamma_ref::Float64
: Reference gamma for normalization: 0 <= gamma_ref < gamma. Default: 1.0max_epoch::Int64
: Maximum number of epochs during training: max_epochs ∈ (1, Inf). Default: 1display::Bool
: Display flag for progress bars. Default: falsegamma_normalization::Bool
: Flag to normalize the threshold by the feature dimension.NOTE: this flag overwrites the
activation
andmatch
settings here to their gamma-normalized equivalents along with adjusting the thresold. Default: falseuncommitted::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: :basic_activationmatch::Symbol
: Selected match function. Default: :basic_matchupdate::Symbol
: Selected weight update function. Default: :basic_updatesort::Bool
: Flag to sort the F2 nodes by activation before the match phaseWhen true, the F2 nodes are sorted by activation before match. When false, an iterative argmax and inhibition procedure is used to find the best-matching unit. Default: false
AdaptiveResonance.opts_SFAM
— Typemutable struct opts_SFAM <: ARTOpts
Summary
Implements a Simple Fuzzy ARTMAP learner's options.
These options are a Parameters.jl
struct, taking custom options keyword arguments. Each field has a default value listed below.
Fields
rho::Float64
: Vigilance parameter: rho ∈ [0, 1]. Default: 0.75alpha::Float64
: Choice parameter: alpha > 0. Default: 1.0e-7epsilon::Float64
: Match tracking parameter: epsilon ∈ (0, 1). Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0max_epoch::Int64
: Maximum number of epochs during training: max_epoch ∈ [1, Inf). Default: 1display::Bool
: Display flag for progress bars. Default: falseuncommitted::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
match::Symbol
: Selected match function. Default: :basic_matchactivation::Symbol
: Selected activation function. Default: :basic_activationupdate::Symbol
: Selected weight update function. Default: :basic_updatesort::Bool
: Flag to sort the F2 nodes by activation before the match phaseWhen true, the F2 nodes are sorted by activation before match. When false, an iterative argmax and inhibition procedure is used to find the best-matching unit. Default: false
Constants
AdaptiveResonance.ACTIVATION_FUNCTIONS
— ConstantACTIVATION_FUNCTIONS
Description
Enumerates all of the activation functions available in the package.
AdaptiveResonance.ADAPTIVERESONANCE_MODULES
— ConstantADAPTIVERESONANCE_MODULES
Description
A combined list of all unsupervised ART and supervised ARTMAP modules from the AdaptiveResonance.jl
package.
AdaptiveResonance.ADAPTIVERESONANCE_VERSION
— ConstantADAPTIVERESONANCE_VERSION
Description
A constant that contains the version of the installed AdaptiveResonance.jl package.
This value is computed at compile time, so it may be used to programmatically verify the version of AdaptiveResonance
that is installed in case a compat
entry in your Project.toml is missing or otherwise incorrect.
AdaptiveResonance.ARTMAP_MODULES
— ConstantARTMAP_MODULES
Description
A list of supervised ARTMAP modules that are available in the AdaptiveResonance.jl
package.
AdaptiveResonance.ART_MODULES
— ConstantART_MODULES
Description
A list of (default) unsupervised ART modules that are available in the AdaptiveResonance.jl
package.
AdaptiveResonance.DDVFA_METHODS
— ConstantDDVFA_METHODS
Description
A list of all DDVFA similarity linkage methods.
AdaptiveResonance.MATCH_FUNCTIONS
— ConstantMATCH_FUNCTIONS
Description
Enumerates all of the match functions available in the package.
AdaptiveResonance.UPDATE_FUNCTIONS
— ConstantUPDATE_FUNCTIONS
Description
Enumerates all of the update functions available in the package.