Classification and Evaluation

Classify a batch or an individual sample, then compare predictions with known labels. See Mismatch vs. Best-Matching-Unit for get_bmu behavior.

Index

Classification

classify

AdaptiveResonance.classify — Function
classify(
    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.

source

Summary

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:315.

classify(art, x; preprocessed, get_bmu)

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

classify(art, x; preprocessed, get_bmu)

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

classify(art, x; preprocessed, get_bmu)

defined at /home/runner/work/AdaptiveResonance.jl/AdaptiveResonance.jl/src/ART/single/modules/HypersphereART.jl:247.

classify(art, x; preprocessed, get_bmu)

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

source

Evaluation

performance