/
variants.jl
52 lines (40 loc) · 1.73 KB
/
variants.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"""
variants.jl
# Description
Includes convenience constructors for common variants of various ART modules.
"""
# -----------------------------------------------------------------------------
# GAMMA-NORMALIZED FUZZYART
# -----------------------------------------------------------------------------
# Shared variant statement for GNFA
const _VARIANT_STATEMENT_GammaNormalizedFuzzyART = """
GammaNormalizedFuzzyART is a variant of [`FuzzyART`](@ref), using the [`AdaptiveResonance.opts_FuzzyART`](@ref) 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.
"""
"""
Constructs a Gamma-Normalized FuzzyART module as a variant of FuzzyART by using the gamma_normalization option.
$(_VARIANT_STATEMENT_GammaNormalizedFuzzyART)
# Arguments
- `kwargs`: keyword arguments of FuzzyART options (see [`AdaptiveResonance.opts_FuzzyART`](@ref))
"""
function GammaNormalizedFuzzyART(;kwargs...)
# Return a FuzzyART module with gamma_normalization high in addition to other passed keyword arguments
return FuzzyART(;gamma_normalization=true, kwargs...)
end
"""
Implements a Gamma-Normalized FuzzyART module with specified options.
$(_VARIANT_STATEMENT_GammaNormalizedFuzzyART)
# Arguments
- `opts::opts_FuzzyART`: the Fuzzy ART options (see [`AdaptiveResonance.opts_FuzzyART`](@ref)).
"""
function GammaNormalizedFuzzyART(opts::opts_FuzzyART)
return SFAM(opts)
end
"""
Implements a Gamma-Normalized FuzzyART module's options.
$(_VARIANT_STATEMENT_GammaNormalizedFuzzyART)
$(_OPTS_DOCSTRING)
"""
function opts_GammaNormalizedFuzzyART(;kwargs...)
return opts_FuzzyART(;choice_by_difference=true, kwargs...)
end