Developer Index

This page lists the types and functions that are internal to the DeepART 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.

DeepART.ARG_N_TESTConstant

ARGNTEST

Description

Common docstring: argument for the number of testing samples to use.

source
DeepART.ARG_N_TRAINConstant

ARGNTRAIN

Description

Common docstring: argument for the number of training samples to use.

source
DeepART.ARG_PConstant

ARG_P

Description

Common docstring: argument for a split ratio p.

source
DeepART.ARG_PLOTConstant

ARG_PLOT

Description

Common docstring: argument for an existing Plots.Plot object to plot atop.

source
DeepART.ARG_SIM_DConstant

ARGSIMD

Description

Common docstring: argument for the simulation options dictionary.

source
DeepART.ARG_XConstant

ARG_X

Description

Common docstring: argument for input data of arbitrary dimension.

source
DeepART.ART_X_W_ARGSConstant

ARTXW_ARGS

Description

Common docstring: shared arguments string for methods using an ART module, sample 'x', and weight vector 'W'.

source
DeepART.BLOCK_TYPESConstant

BLOCK_TYPES

Description

The names of the blocks that are encountered during L2 experiments.

source
DeepART.DEFAULT_HEAD_SPECConstant

DEFAULTHEADSPEC

Description

The default shared head layers as a list of a number of nodes per layer, including the inputs and outputs.

source
DeepART.DEFAULT_SHARED_SPECConstant

DEFAULTSHAREDSPEC

Description

The default shared hidden layer as a list of a number of nodes per layer, including the inputs and outputs.

source
DeepART.IInfConstant

IInf

Description

Infinity for integers, used for getting the minimum of training/testing values.

source
DeepART._COMMON_DOCConstant

COMMONDOC

Description

Docstring prefix denoting that the constant is used as a common docstring element for other docstrings.

source
DeepART.ARTINSTARTType
mutable struct ARTINSTART{T<:Flux.Chain, U<:AdaptiveResonance.ARTModule} <: DeepART.DeepARTModule

Summary

Stateful information of an ARTINSTART model.

Fields

  • model::Flux.Chain: The shared model.
  • head::AdaptiveResonance.ARTModule: The heads.
  • n_categories::Int64: Number of category weights (F2 nodes).
  • stats::Dict{String, Any}: The statistics dictionary for logging.
source
DeepART.AgentType
struct Agent{T} <: DeepART.AbstractAgent

Summary

L2 AbstractAgent struct.

Fields

  • agent::Any: The DDVFA module.
  • params::Dict: Parameters used for l2logging.
  • scenario::DeepART.ExperienceQueueContainer: Container for the Experience Queue.
source
DeepART.AgentMethod

Constructor for a Agent using the scenario dictionary and optional DDVFA keyword argument options.

Arguments

  • scenario::AbstractDict: l2logger scenario as a dictionary.
source
DeepART.AgentMethod

Creates an agent with an empty experience queue.

Arguments

  • agent::T: the agent module.
  • opts: the options struct used to initialize the module and set the logging params.
source
DeepART.ClassIncrementalDataSplitType
struct ClassIncrementalDataSplit

Summary

A class-incremental variant of a DataSplit containing instead vectors of SupervisedDatasets.

Fields

  • train::Vector{DeepART.SupervisedDataset}: The vector of training class datasets.
  • test::Vector{DeepART.SupervisedDataset}: The vector of testing class datasets.
source
DeepART.DataSplitType
struct DataSplit

Summary

A train/test split of supervised datasets.

Fields

  • train::DeepART.SupervisedDataset: The training portion of the dataset.
  • test::DeepART.SupervisedDataset: The test portion of the dataset.
source
DeepART.DataSplitMethod
DataSplit(
    X_train::AbstractArray{T} where T<:Real,
    y_train::AbstractArray{T} where T<:Integer,
    X_test::AbstractArray{T} where T<:Real,
    y_test::AbstractArray{T} where T<:Integer;
    shuffle
) -> DeepART.DataSplit

Summary

Convenience constructor for a supervised DataSplit that takes each set of features x and labels yseparately.

Arguments

  • X_train::AbstractFeatures: the training features.
  • y_train::AbstractLabels: the training integer labels.
  • X_test::AbstractFeatures: the testing features.
  • y_test::AbstractLabels: the testing integer labels.
  • shuffle::Bool: flag for shuffling the data, default true.

Method List / Definition Locations

DataSplit(X_train, y_train, X_test, y_test; shuffle)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/DataSplit.jl:37.

source
DeepART.DataSplitMethod
DataSplit(
    features::AbstractArray{T} where T<:Real,
    labels::AbstractArray{T} where T<:Integer;
    p,
    shuffle
) -> DeepART.DataSplit

Summary

Constructor for a DataSplit taking a set of features and options for the split ratio and shuffle flag.

Arguments

  • features::AbstractFeatures: the input features as an array of samples.

  • labels::AbstractLabels: the supervised labels.

  • p::Float: kwarg, the split ratio ∈ (0, 1), default 0.8.

  • shuffle::Bool: flag for shuffling the data, default true.

Method List / Definition Locations

DataSplit(features, labels; p, shuffle)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/DataSplit.jl:67.

source
DeepART.DataSplitMethod
DataSplit(
    dataset::AbstractMatrix;
    shuffle,
    p
) -> DeepART.DataSplit

Summary

Constructs a DataSplit from an existing dataset.

This assumes that the last column is the labels and all others are features.

Arguments

  • dataset::AbstractMatrix: the dataset to split.

  • shuffle::Bool: flag for shuffling the data, default true.

  • p::Float: kwarg, the split ratio ∈ (0, 1), default 0.8.

Method List / Definition Locations

DataSplit(dataset; shuffle, p)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/data.jl:650.

source
DeepART.DeepARTModuleType
abstract type DeepARTModule

Summary

Supertype of all DeepART modules that adhere to the train! and classify usages.

Fields

source
DeepART.DeepHeadARTType
mutable struct DeepHeadART{T<:Flux.Chain, U<:Flux.Chain, V<:Flux.Chain} <: AdaptiveResonance.ARTModule

Summary

Stateful information of a DeepHeadART module.

Fields

  • F1::Flux.Chain: Feature presentation layer.
  • F2::DeepART.MultiHeadField: Feedback expectancy layer.
  • config::AdaptiveResonance.DataConfig: Data configuration struct.
  • 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.
  • n_instance::Vector{Int64}: Number of weights associated with each category.
  • n_categories::Int64: Number of category weights (F2 nodes).
source
DeepART.DeeperARTType
struct DeeperART{T<:Flux.Chain, U<:Flux.Chain}

Summary

Stateful information of a DeeperART module.

Fields

  • F1::Flux.Chain: Feature presentation layer.
  • F2::Flux.Chain: Feedback expectancy layer.
source
DeepART.EWCType
mutable struct EWC <: Optimisers.AbstractRule

Summary

The parameters if an EWCIncremental optimiser.

Fields

  • eta::Float64: Default: 0.01

  • lambda::Float64: Default: 0.1

  • decay::Float64: Default: 0.9

  • alpha::Float64: Default: 0.1

  • new_task::Bool: Default: true

source
DeepART.EWCLossOptsType
mutable struct EWCLossOpts

Summary

Options for the EWCLossState.

Fields

  • lambda::Float64: EWC regularization strength. Default: 1.0

  • alpha::Float64: EWC FIM update ratio. Default: 0.1

  • first_task::Bool: Flag for if the first task is being trained upon. Default: true

  • normalize::Bool: Flag for if the FIM should be normalized. Default: true

source
DeepART.EWCLossStateType
struct EWCLossState

Summary

Custom state for the EWCState optimiser.

Fields

  • FIM::Any: The Fisher Information Matrix (FIM) approximation.
  • old_params::Any: The 'old parameters' that the FIM are computed on.
source
DeepART.EWCLossStateMethod
EWCLossState(
    state::DeepART.EWCLossState,
    o::DeepART.EWCLossOpts,
    x,
    dx,
    n_samples
) -> DeepART.EWCLossState

Summary

Constructor for a new EWCLossState given an old state, the options, parameters, and the gradient.

Arguments

  • state::EWCLossState: the old state.
  • o::EWCLossOpts: the options for the EWC loss.
  • x: the flat network parameters.
  • dx: the gradient of the loss with respect to the parameters.

Method List / Definition Locations

EWCLossState(state, o, x, dx, n_samples)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/Optimisers/EWCLoss.jl:88.

source
DeepART.EWCStateType
struct EWCState

Summary

Custom state for the EWCState optimiser.

Fields

  • FIM::Any: The Fisher Information Matrix (FIM) approximation.
  • old_params::Any: The 'old parameters' that the FIM are computed on.
source
DeepART.ExperienceType
struct Experience

Summary

Experience block for an agent.

Taken from l2logger_template.

Fields

  • task_name::String: The task name.
  • seq_nums::DeepART.SequenceNums: The sequence numbers (block and experience count).
  • block_type::String: The block type, valid values are ∈ ["train", "test"].
  • update_model::Bool: Flag for updating the model (i.e., true is to train, false is to classify).
source
DeepART.ExperienceMethod
Experience(
    task_name::AbstractString,
    seq_nums::DeepART.SequenceNums,
    block_type::AbstractString
) -> DeepART.Experience

Summary

Constructs an Experience, setting the update_model field based upon the block type.

Arguments

  • task_name::AbstractString: the name of the current task.
  • seq_nums::SequenceNums: the block and experience number of the Experience.
  • block_type::AbstractString: the block type ∈ ["train", "test"]. Using "train" sets update_model to true, "test" to false.

Method List / Definition Locations

Experience(task_name, seq_nums, block_type)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/experience.jl:76.

source
DeepART.ExperienceQueueContainerType
struct ExperienceQueueContainer

Summary

Container for the ExperienceQueue and some statistics about it.

Fields

  • queue::DataStructures.Deque{DeepART.Experience}: The ExperienceQueue itself.
  • stats::Dict{String, Any}: The statistics about the queue. NOTE These statistics reflect the queue at construction, not after any processing.
source
DeepART.FIAType
mutable struct FIA{T<:Flux.Chain} <: DeepART.DeepARTModule

Summary

Stateful information of an FIA model.

Fields

  • model::Flux.Chain: The shared model.
  • opts::DeepART.opts_FIA: An opts_FIA options container.
  • stats::Dict{String, Any}: The statistics dictionary for logging.
source
DeepART.FIAMethod

Keyword argument constructor for a FIA module passing the keyword arguments to the opts_FIA for the module.

Arguments

  • kwargs...: the options keyword arguments.
source
DeepART.FluxFloatType

Definition of the precision used for Flux computations; used for loading data and constructing objects depending on Flux elements.

source
DeepART.IEWCType
mutable struct IEWC <: Optimisers.AbstractRule

Summary

The parameters if an IEWC optimiser.

Fields

  • eta::Float64: Default: 0.01

  • lambda::Float64: Default: 0.1

  • decay::Float64: Default: 0.9

  • alpha::Float64: Default: 0.1

  • new_task::Bool: Default: true

source
DeepART.IEWCStateType
mutable struct IEWCState{T<:AbstractArray, U<:AbstractArray}

Summary

Custom state for the IEWC optimiser.

Fields

  • FIM::Vector{T} where T<:AbstractArray: The Fisher Information Matrix (FIM) approximation.
  • old_params::Vector{U} where U<:AbstractArray: The 'old parameters'.
source
DeepART.INSTARTType
mutable struct INSTART{T<:Flux.Chain, U<:Flux.Chain} <: DeepART.DeepARTModule

Summary

Stateful information of an INSTART model.

Fields

  • model::Flux.Chain: The shared model.
  • heads::Vector{U} where U<:Flux.Chain: The heads.
  • opts::DeepART.opts_INSTART: An opts_INSTART options container.
  • 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.
  • n_instance::Vector{Int64}: Number of weights associated with each category.
  • n_categories::Int64: Number of category weights (F2 nodes).
  • stats::Dict{String, Any}: The statistics dictionary for logging.
source
DeepART.MultiHeadFieldType
struct MultiHeadField{T<:Flux.Chain, J<:Flux.Chain}

Summary

Container for a multihead DeeperART neural network field.

Fields

  • shared::Flux.Chain: The single shared layers object.
  • heads::Vector{J} where J<:Flux.Chain: The heads of the network as a list of layers.
  • opts::DeepART.opts_MultiHeadField: Container of the opts_MultiHeadField that created this field.
source
DeepART.SequenceNumsType
struct SequenceNums

Summary

Sequence numbers for a block and Experience.

Taken from l2logger_template.

Fields

  • block_num::Int64: The block number.
  • exp_num::Int64: The experience number.
  • task_num::Int64: The task-specific count.
source
DeepART.SimpleDeepARTType
struct SimpleDeepART{T<:Flux.Chain}

Summary

Container for a simple DeepART module.

Fields

  • model::Flux.Chain: The Flux.Chain feature extractor model.
  • art::AdaptiveResonance.FuzzyART: The FuzzyART module.
  • opts::DeepART.opts_SimpleDeepART: The opts_SimpleDeepART options and flags for the module.
  • model_dim::Int64: The model output dimension for reference.
source
DeepART.SingleFuzzyType
struct SingleFuzzy{M<:(AbstractVector)} <: DeepART.CustomLayer

Summary

A single FuzzyART-like layer for a Flux.jl model, implemented for use in a vector container.

Fields

  • weight::AbstractVector: The weight vector for the layer.
source
DeepART.StatsDictType

StatsDict

Description

Alias for a statistics dictionary being string keys mapping to any object.

source
DeepART.SupervisedDatasetType
struct SupervisedDataset{T<:(AbstractArray{T} where T<:Real), U<:(AbstractArray{T} where T<:Integer)}

Summary

A struct containing a supervised set of features in a matrix x mapping to integer labels y.

Fields

  • x::AbstractArray{T} where T<:Real: A set of features.
  • y::AbstractArray{T} where T<:Integer: The labels corresponding to each feature.
source
DeepART.WTANetType
struct WTANet{T<:Flux.Chain, U<:NamedTuple}

Summary

Container for the stateful information of a WTANet module.

Fields

  • model::Flux.Chain: The feedforward network.
  • optim::NamedTuple: Container for the optimiser.
  • opts::DeepART.opts_WTANet: The options for construction and usage.
source
DeepART.WTANetMethod

Keyword argument constructor for a WTANet module passing the keyword arguments to the opts_WTANet for the module.

Arguments

  • kwargs...: the options keyword arguments.
source
DeepART.opts_ARTINSTARTType
struct opts_ARTINSTART

Summary

Options container for a ARTINSTART module.

Fields

  • rho::Float64: The vigilance parameter of the ARTINSTART module, rho ∈ (0.0, 1.0]. Default: 0.6

  • eta::Float64: Instar learning rate. Default: 0.1

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

  • beta::Any: Deep model learning parameter: beta ∈ (0, 1]. Default: 1.0

  • beta_s::Any: Head learning parameter: beta ∈ (0, 1]. Default: 0.01

  • 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

  • head_dim::Int64: The dimension of the interaction field. Default: 128

  • gpu::Bool: Flag for pushing the models to the GPU. Default: false

  • update::String: Update method ∈ ["art", "instar"]. Default: art

  • softwta::Bool: Soft WTA update rule flag. Default: false

  • leader::Bool: Flag for the use of a leader neuron, which negates the use of the SFAM head. Default: false

source
DeepART.opts_DeepHeadARTType
struct opts_DeepHeadART

Summary

Options container for a DeepHeadART module.

Fields

  • rho::Float64: The vigilance parameter of the DeepHeadART module, rho ∈ (0.0, 1.0]. Default: 0.6

  • eta::Float64: Instar learning rate. Default: 0.1

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

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

  • F1_spec::Vector{Int64}: Simple dense specifier for the F1 layer. Default: [2, 5, 3]

  • F2_shared::Vector{Int64}: Shared dense specifier for the F2 layer. Default: [3, 6, 3]

  • F2_heads::Vector{Int64}: Shared dense specifier for the F2 layer. Default: [3, 5, 3]

source
DeepART.opts_DeeperARTType
struct opts_DeeperART

Summary

Options container for a DeeperART module.

Fields

  • rho::Float64: The vigilance parameter of the DeeperART module, rho ∈ (0.0, 1.0]. Default: 0.6

  • F1_spec::Vector{Int64}: Simple dense specifier for the F1 layer. Default: [2, 5, 3]

  • F2_spec::Vector{Int64}: Simple dense specifier for the F2 layer. Default: [3, 5, 3]

source
DeepART.opts_FIAType
struct opts_FIA

Summary

Options container for a FIA module.

Fields

  • rho::Float32: The vigilance parameter of the FIA module, rho ∈ (0.0, 1.0]. Default: 0.6

  • eta::Float32: Instar learning rate. Default: 0.1

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

  • beta::Float32: Deep model learning parameter: beta ∈ (0, 1]. Default: 1.0

  • 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

  • gpu::Bool: Flag for pushing the models to the GPU. Default: false

  • update::String: Update method ∈ ["art", "instar"]. Default: art

  • softwta::Bool: Soft WTA update rule flag. Default: false

  • leader::Bool: Flag for the use of a leader neuron, which negates the use of the SFAM head. Default: false

source
DeepART.opts_INSTARTType
struct opts_INSTART

Summary

Options container for a INSTART module.

Fields

  • rho::Float64: The vigilance parameter of the INSTART module, rho ∈ (0.0, 1.0]. Default: 0.6

  • eta::Float64: Instar learning rate. Default: 0.1

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

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

  • 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

  • head_dim::Int64: The dimension of the interaction field. Default: 128

  • gpu::Bool: Flag for pushing the models to the GPU. Default: false

  • update::String: Update method ∈ ["art", "instar"]. Default: art

  • softwta::Bool: Soft WTA update rule flag. Default: false

  • head::String: Head layer type ∈ ["fuzzy", "hypersphere"]. Default: fuzzy

  • leader::Bool: Flag for the use of a leader neuron, which negates the use of the SFAM head. Default: false

source
DeepART.opts_MultiHeadFieldType
struct opts_MultiHeadField

Summary

The options container for a MultiHeadField module.

Fields

  • shared_spec::Vector{Int64}: The shared hidden layer as a list of a number of nodes per layer, including the inputs and outputs. Default: DEFAULTSHAREDSPEC

  • head_spec::Vector{Int64}: The head layers specifier as a list of a number of nodes per layer, including the inputs and outputs. Default: DEFAULTHEADSPEC

  • eta::Float64: Instar learning rate. Default: 0.1

source
DeepART.opts_SimpleDeepARTType
struct opts_SimpleDeepART

Summary

Options for the construction and usage of a SimpleDeepART module.

Fields

  • size_tuple::Tuple: The model input size tuple. Default: (28, 28, 1, 1)

  • conv::Bool: Flag for if the model is convolutional. Default: true

  • opts_fuzzyart::AdaptiveResonance.opts_FuzzyART: The FuzzyART module options. Default: opts_FuzzyART()

source
DeepART.opts_WTANetType
struct opts_WTANet

Summary

Options for the construction and usage of a WTANet module.

Fields

  • rho::Float64: The vigilance parameter of the WTANet module, rho ∈ (0.0, 1.0]. Default: 0.6

  • optimiser::Symbol: Name of the optimiser to use. Default: :Descent

  • model_spec::Vector{Int64}: Simple dense specifier for the model. Default: [2, 10, 10]

source
DeepART.L2TaskIncrementalDataSplitMethod
L2TaskIncrementalDataSplit(
    datasplit::DeepART.ClassIncrementalDataSplit,
    groupings::Vector{Vector{Int64}};
    shuffle
) -> Tuple{DeepART.ClassIncrementalDataSplit, Dict{String, Int64}}

Summary

Combines classes in the training and testing datasets of a ClassIncrementalDataSplit according to the provided groupings.

Arguments

  • datasplit::ClassIncrementalDataSplit: a ClassIncrementalDataSplit to combine elements of according to the groupings
  • groupings::Vector{Vector{Int}}: the set of groupings to perform.
  • shuffle::Bool: flag for shuffling the data, default true.

Method List / Definition Locations

L2TaskIncrementalDataSplit(datasplit, groupings; shuffle)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/ClassIncrementalDataSplit.jl:217.

source
DeepART.TaskIncrementalDataSplitMethod
TaskIncrementalDataSplit(
    datasplit::DeepART.ClassIncrementalDataSplit,
    groupings::Vector{Vector{Int64}};
    shuffle
) -> DeepART.ClassIncrementalDataSplit

Summary

Combines classes in the training and testing datasets of a ClassIncrementalDataSplit according to the provided groupings.

Arguments

  • datasplit::ClassIncrementalDataSplit: a ClassIncrementalDataSplit to combine elements of according to the groupings
  • groupings::Vector{Vector{Int}}: the set of groupings to perform.
  • shuffle::Bool: flag for shuffling the data, default true.

Method List / Definition Locations

TaskIncrementalDataSplit(datasplit, groupings; shuffle)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/ClassIncrementalDataSplit.jl:192.

source
DeepART.basic_testMethod
basic_test(
    art::Union{AdaptiveResonance.ARTModule, DeepART.DeepARTModule, DeepART.Hebb.BlockNet, DeepART.Hebb.HebbModel},
    data::DeepART.SupervisedDataset;
    display,
    desc
) -> Vector{Int64}

Summary

Task-homogenous testing loop for a DeepARTModule model.

Arguments

  • art::CommonARTModule: the CommonARTModule model.

  • n_test::Integer: the number of testing iterations.

Method List / Definition Locations

basic_test(art, data; display, desc)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:157.

source
DeepART.basic_train!Method
basic_train!(
    art::Union{AdaptiveResonance.ARTModule, DeepART.DeepARTModule, DeepART.Hebb.BlockNet, DeepART.Hebb.HebbModel},
    data::DeepART.SupervisedDataset;
    display,
    desc
) -> Vector{Int64}

Summary

Task-homogenous training loop for a DeepART model.

Arguments

  • art::CommonARTModule: the CommonARTModule model.

  • data::DataSplit: a DataSplit container of a supervised train/test split.

  • n_train::Integer: the number of training iterations.

Method List / Definition Locations

basic_train!(art, data; display, desc)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:106.

source
DeepART.create_complex_condensed_plot_altFunction
create_complex_condensed_plot_alt(
    perfs,
    vals,
    class_labels
) -> Tuple{Plots.Plot, Vector{Any}, Vector{Any}}
create_complex_condensed_plot_alt(
    perfs,
    vals,
    class_labels,
    percentages::Bool
) -> Tuple{Plots.Plot, Vector{Any}, Vector{Any}}

Summary

Create and return an alternate complex condensed scenario plot.

Method List / Definition Locations

create_complex_condensed_plot_alt(perfs, vals, class_labels)
create_complex_condensed_plot_alt(
    perfs,
    vals,
    class_labels,
    percentages
)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:379.

source
DeepART.create_confusion_heatmapMethod
create_confusion_heatmap(
    class_labels::Vector{String},
    y::AbstractVector{T} where T<:Integer,
    y_hat::AbstractVector{T} where T<:Integer;
    kwargs...
) -> Plots.Plot

Summary

Creates the confusion matrix as a heatmap using Plots.

Arguments

  • class_labels::Vector{String}: the string labels for the classes.
  • y::IntegerVector: the class truth values.
  • y_hat::IntegerVector: the class estimates.

Method List / Definition Locations

create_confusion_heatmap(class_labels, y, y_hat; kwargs...)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:143.

source
DeepART.create_custom_confusion_heatmapFunction
create_custom_confusion_heatmap(
    class_labels::Vector{String},
    norm_cm::AbstractMatrix{T} where T<:Real
) -> Plots.Plot
create_custom_confusion_heatmap(
    class_labels::Vector{String},
    norm_cm::AbstractMatrix{T} where T<:Real,
    fontsize::Real
) -> Plots.Plot

Summary

Returns a handle to a labeled and annotated heatmap plot of the confusion matrix.

Arguments

  • norm_cm::RealMatrix: the normalized confuction matrix to plot as a heatmap.

Method List / Definition Locations

create_custom_confusion_heatmap(class_labels, norm_cm)
create_custom_confusion_heatmap(
    class_labels,
    norm_cm,
    fontsize
)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:277.

source
DeepART.create_unicode_confusion_heatmapMethod
create_unicode_confusion_heatmap(
    class_labels::Vector{String},
    y::AbstractVector{T} where T<:Integer,
    y_hat::AbstractVector{T} where T<:Integer;
    kwargs...
) -> Union{UnicodePlots.Plot{T, Val{true}} where T<:UnicodePlots.HeatmapCanvas, UnicodePlots.Plot{T, Val{false}} where T<:UnicodePlots.HeatmapCanvas}

Summary

Makes and returns a unicode confusion heatmap for terminal viewing.

Method List / Definition Locations

create_unicode_confusion_heatmap(
    class_labels,
    y,
    y_hat;
    kwargs...
)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:110.

source
DeepART.evaluate_agent!Method
evaluate_agent!(
    agent::DeepART.Agent,
    experience::DeepART.Experience,
    data::DeepART.ClassIncrementalDataSplit,
    name_map::Dict{String, Int64}
) -> Dict

Summary

Evaluates a single agent on a single experience, training or testing as needed.

Arguments

  • agent::Agent: the Agent to evaluate.
  • exp::Experience: the Experience to use for training/testing.

Method List / Definition Locations

evaluate_agent!(agent, experience, data, name_map)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/agents.jl:165.

source
DeepART.flatty_hottyFunction
flatty_hotty(
    data::DeepART.SupervisedDataset
) -> DeepART.SupervisedDataset{T, U} where {T<:(AbstractArray{T} where T<:Real), U<:OneHotArrays.OneHotArray}
flatty_hotty(
    data::DeepART.SupervisedDataset,
    n_class::Int64
) -> DeepART.SupervisedDataset{T, U} where {T<:(AbstractArray{T} where T<:Real), U<:OneHotArrays.OneHotArray}

Summary

Flattens the feature dimensions of a SupervisedDataset and one-hot encodes the labels.

Arguments

  • data::SupervisedDataset: a SupervisedDataset containing samples and their labels.

  • n_class::Int=0: the true number of classes (if known).

Method List / Definition Locations

flatty_hotty(data)
flatty_hotty(data, n_class)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/SupervisedDataset.jl:130.

source
DeepART.flatty_hottyFunction
flatty_hotty(data::DeepART.DataSplit) -> DeepART.DataSplit
flatty_hotty(
    data::DeepART.DataSplit,
    n_class::Int64
) -> DeepART.DataSplit

Summary

Flattens and one-hot encodes a DataSplit.

Arguments

  • data::DataSplit: a DataSplit container of a supervised train/test split.

  • n_class::Int=0: the true number of classes (if known).

Method List / Definition Locations

flatty_hotty(data)
flatty_hotty(data, n_class)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/DataSplit.jl:136.

source
DeepART.flux_accuracyMethod
flux_accuracy(
    y_hat::AbstractMatrix,
    y_truth::AbstractMatrix,
    n_class::Int64
) -> Any

Summary

Definition of testing accuracy for Flux.jl training loop logs.

Arguments

  • y_hat::AbstractMatrix: the predicted labels as a matrix.
  • y_truth::AbstractMatrix: the true labels as a matrix.
  • n_class::Int: the number of classes in the dataset.

Method List / Definition Locations

flux_accuracy(y_hat, y_truth, n_class)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:508.

source
DeepART.full_scenarioMethod
full_scenario(
    art::Union{AdaptiveResonance.ARTModule, DeepART.DeepARTModule, DeepART.Hebb.BlockNet, DeepART.Hebb.HebbModel},
    opts,
    data::DeepART.ClassIncrementalDataSplit,
    exp_dir::AbstractString,
    l2logger,
    d::AbstractDict
)

Summary

Runs a full scenario for a given dataset.

A CommonARTModule here needs to have:

  • incrementalsupervisedtrain!(...)
  • incremental_classify(...)
  • stats["M"] and stats["T"] for ART match and activation.

Arguments

  • art::CommonARTModule: the ART module to use.
  • opts: the options used to create the ART module.
  • data::ClassIncrementalDataSplit: the data to use.
  • exp_dir::AbstractString: the directory to containing the config and scenario files for each permutation.
  • l2logger::PythonCall.Py: the l2logger Python library module, used for instantiating the specific DataLogger itself here.

Method List / Definition Locations

full_scenario(art, opts, data, exp_dir, l2logger, d)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/agents.jl:324.

source
DeepART.gen_all_scenariosFunction
gen_all_scenarios(
    datasets::Dict{String, DeepART.DataSplit},
    groupings_dict::AbstractDict
)
gen_all_scenarios(
    datasets::Dict{String, DeepART.DataSplit},
    groupings_dict::AbstractDict,
    n_max::Int64
)

Summary

Generates all scenarios.

Method List / Definition Locations

gen_all_scenarios(datasets, groupings_dict)
gen_all_scenarios(datasets, groupings_dict, n_max)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/scenario.jl:470.

source
DeepART.gen_scenariosFunction
gen_scenarios(
    key::AbstractString,
    datasplit::DeepART.DataSplit,
    grouping_dict::AbstractDict
)
gen_scenarios(
    key::AbstractString,
    datasplit::DeepART.DataSplit,
    grouping_dict::AbstractDict,
    n_max::Int64
)

Summary

Generates scenarios for one dataset.

Method List / Definition Locations

gen_scenarios(key, datasplit, grouping_dict)
gen_scenarios(key, datasplit, grouping_dict, n_max)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/scenario.jl:442.

source
DeepART.get_accuraciesMethod
get_accuracies(
    y::AbstractVector{T} where T<:Integer,
    y_hat::AbstractVector{T} where T<:Integer,
    n_classes::Integer
) -> Any

Summary

Get a list of the percentage accuracies.

Arguments

  • y::IntegerVector: the target values.
  • y_hat::IntegerVector: the agent's estimates.
  • n_classes::Integer: the number of total classes in the test set.

Method List / Definition Locations

get_accuracies(y, y_hat, n_classes)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:371.

source
DeepART.get_confusionMethod
get_confusion(
    y::AbstractVector{T} where T<:Integer,
    y_hat::AbstractVector{T} where T<:Integer,
    n_classes::Integer
) -> Matrix{Int64}

Summary

Wrapper method for getting the raw confusion matrix.

Arguments

  • y::IntegerVector: the target values.
  • y_hat::IntegerVector: the agent's estimates.
  • n_classes::Integer: the number of total classes in the test set.

Method List / Definition Locations

get_confusion(y, y_hat, n_classes)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:84.

source
DeepART.get_dense_modelMethod
get_dense_model(
    size_tuple::Tuple
) -> Union{Flux.Chain{T} where T<:Tuple{Flux.Dense{typeof(NNlib.σ)}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}}}, Flux.Chain{T} where T<:Tuple{Flux.Scale{typeof(NNlib.σ), A} where A<:(AbstractVector), Flux.Dense{typeof(NNlib.σ), Matrix{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}}}}

Summary

Constructs a dense model.

Arguments

  • size_tuple::Tuple{Int}: a tuple of the model input dimensions.

Method List / Definition Locations

get_dense_model(size_tuple)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/common.jl:146.

source
DeepART.get_featuresMethod
get_features(
    model::DeepART.SimpleDeepART,
    data::DeepART.SupervisedDataset,
    index::Integer
) -> Any

Summary

Runs inference on the SimpleDeepART model's feature extractor.

Arguments

  • model::SimpleDeepART: the SimpleDeepART model.

  • data::SupervisedDataset: the SupervisedDataset dataset with the features to run inference on.

  • index::Integer: the sample index to extract features of.

Method List / Definition Locations

get_features(model, data, index)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/SimpleDeepART/SimpleDeepART.jl:120.

source
DeepART.get_index_from_nameMethod
get_index_from_name(
    labels::Array{T<:AbstractString, 1},
    name::AbstractString
) -> Any

Summary

Gets an integer index of where a string name appears in a list of strings.

Arguments

  • labels::Vector{T} where T <: AbstractString: the list of strings to search.
  • name::AbstractString: the name to search for in the list of labels.

Method List / Definition Locations

get_index_from_name(labels, name)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/agents.jl:142.

source
DeepART.get_loaderMethod
get_loader(
    art::AdaptiveResonance.ARTModule,
    data::DeepART.SupervisedDataset
) -> MLUtils.DataLoader{_A, _B, _C, Val{nothing}, DeepART.SupervisedDataset{T, U}, Random.TaskLocalRNG} where {_A<:Union{MLUtils.BatchView, MLUtils.ObsView}, _B, _C, T<:(AbstractArray{T} where T<:Real), U<:(AbstractArray{T} where T<:Integer)}

Summary

Generates a data loader for a CommonARTModule training/testing loop.

Method List / Definition Locations

get_loader(art, data)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:53.

source
DeepART.get_nMethod
get_n(n::Integer, data::DeepART.SupervisedDataset) -> Any

Summary

Helper function for making sure that the selected number of samples is within the bounds of the current dataset.

Arguments

  • n::Integer: the selected number of samples to train/test on.
  • data::SupervisedDataset: the dataset to check against.

Method List / Definition Locations

get_n(n, data)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/post-common.jl:28.

source
DeepART.get_normalized_confusionMethod
get_normalized_confusion(
    y::AbstractVector{T} where T<:Integer,
    y_hat::AbstractVector{T} where T<:Integer,
    n_classes::Integer
) -> Matrix{Float64}

Summary

Get the normalized confusion matrix.

Arguments

  • y::IntegerVector: the target values.
  • y_hat::IntegerVector: the agent's estimates.
  • n_classes::Integer: the number of total classes in the test set.

Method List / Definition Locations

get_normalized_confusion(y, y_hat, n_classes)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:96.

source
DeepART.get_rep_convMethod
get_rep_conv(
    size_tuple::Tuple,
    head_dim::Integer
) -> Flux.Chain{T} where T<:Tuple{typeof(DeepART.complement_code_conv), Flux.Chain{T} where T<:Tuple{Any}, Flux.Chain{T} where T<:Tuple{Flux.MaxPool, typeof(DeepART.complement_code_conv)}, Flux.Chain{T} where T<:Tuple{Any}, Flux.Chain{T} where T<:Tuple{Flux.AdaptiveMaxPool, typeof(Flux.flatten), typeof(DeepART.complement_code)}, Flux.Chain{T} where T<:Tuple{Any, typeof(vec)}}

Summary

Constructs and returns the representative convolutional model for DeepARTModules.

Arguments

  • size_tuple::Tuple: the size of the input data for convolutions and batchs.
  • head_dim::Integer: the dimension of the output head for the FuzzyARTMAP field.

Method List / Definition Locations

get_rep_conv(size_tuple, head_dim)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/representatives.jl:93.

source
DeepART.get_rep_denseMethod
get_rep_dense(
    n_input::Integer,
    head_dim::Integer
) -> Flux.Chain{T} where T<:Tuple{typeof(DeepART.complement_code), Any, typeof(DeepART.complement_code), Any, typeof(DeepART.complement_code), Any}

Summary

Constructs and returns the representative dense model for DeepARTModules.

Arguments

  • n_input::Integer: the size of the input data.
  • head_dim::Integer: the dimension of the output head for the FuzzyARTMAP field.

Method List / Definition Locations

get_rep_dense(n_input, head_dim)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/representatives.jl:36.

source
DeepART.get_rep_fia_convMethod
get_rep_fia_conv(
    size_tuple::Tuple,
    head_dim::Integer
) -> Flux.Chain{T} where T<:Tuple{typeof(DeepART.complement_code_conv), Flux.Chain{T} where T<:Tuple{Any}, Flux.Chain{T} where T<:Tuple{Flux.MaxPool, typeof(DeepART.complement_code_conv)}, Flux.Chain{T} where T<:Tuple{Any}, Flux.Chain{T} where T<:Tuple{Flux.AdaptiveMaxPool, typeof(Flux.flatten), typeof(DeepART.complement_code)}, Flux.Chain{T} where T<:Tuple{Any, typeof(vec)}}

Summary

Constructs and returns the representative convolutional model for DeepARTModules.

Arguments

  • size_tuple::Tuple: the size of the input data for convolutions and batchs.
  • head_dim::Integer: the dimension of the output head for the FuzzyARTMAP field.

Method List / Definition Locations

get_rep_fia_conv(size_tuple, head_dim)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/representatives.jl:59.

source
DeepART.get_rep_fia_denseMethod
get_rep_fia_dense(
    n_input::Integer,
    head_dim::Integer
) -> Flux.Chain{T} where T<:Tuple{typeof(DeepART.complement_code), Any, typeof(DeepART.complement_code), Any}

Summary

Constructs and returns the representative dense model for DeepARTModules.

Arguments

  • n_input::Integer: the size of the input data.
  • head_dim::Integer: the dimension of the output head for the FuzzyARTMAP field.

Method List / Definition Locations

get_rep_fia_dense(n_input, head_dim)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/representatives.jl:16.

source
DeepART.group_datasetsFunction
group_datasets(
    data::Vector{DeepART.SupervisedDataset},
    group::Vector{Int64}
) -> DeepART.SupervisedDataset
group_datasets(
    data::Vector{DeepART.SupervisedDataset},
    group::Vector{Int64},
    shuffle::Bool
) -> DeepART.SupervisedDataset

Summary

Returns a SupervisedDatasets that combines the datasets in a ClassIncrementalSupervisedDataset at the indices given by group.

Arguments

  • data::ClassIncrementalSupervisedDataset: the vector of SupervisedDatasets to select and combine from.
  • group::Vector{Int}: the indices to select from for combining.
  • shuffle::Bool: flag for pairwise shuffling the dataset after it has been combined, default true.

Method List / Definition Locations

group_datasets(data, group)
group_datasets(data, group, shuffle)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/ClassIncrementalDataSplit.jl:130.

source
DeepART.incremental_supervised_train!Method
incremental_supervised_train!(
    art::AdaptiveResonance.ART,
    x::AbstractArray{T} where T<:Real,
    y::Integer
) -> Any

Summary

Dispatch overload for incremental supervised training for an ART.ART module.

Arguments

  • art::ART.ART: the supervised ART.ART module.

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

  • y::Integer: the label for the input sample.

Method List / Definition Locations

incremental_supervised_train!(art, x, y)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/incremental.jl:20.

source
DeepART.incremental_supervised_train!Method
incremental_supervised_train!(
    art::AdaptiveResonance.ARTMAP,
    x::AbstractArray{T} where T<:Real,
    y::Integer
) -> Any

Summary

Dispatch overload for incremental supervised training for an ART.ARTMAP module.

Arguments

  • art::ART.ARTMAP: the supervised ART.ARTMAP module.

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

  • y::Integer: the label for the input sample.

Method List / Definition Locations

incremental_supervised_train!(art, x, y)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/incremental.jl:43.

source
DeepART.incremental_supervised_train!Method
incremental_supervised_train!(
    art::DeepART.DeepARTModule,
    x::AbstractArray{T} where T<:Real,
    y::Integer
) -> Any

Summary

Overload for incremental supervised training for a DeepARTModule model.

Arguments

  • art::DeepARTModule: the DeepARTModule model.

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

  • y::Integer: the label for the input sample.

Method List / Definition Locations

incremental_supervised_train!(art, x, y)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/incremental.jl:66.

incremental_supervised_train!(art, x, y)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/incremental.jl:82.

source
DeepART.initialize_exp_queue!Method
initialize_exp_queue!(
    eqc::DeepART.ExperienceQueueContainer,
    scenario_dict::AbstractDict
)

Summary

Initializes an ExperienceQueueContainer from the provided scenario dictionary.

Arguments

  • eqc::ExperienceQueueContainer: the container with the queue and stats to initialize.
  • scenario_dict::AbstractDict: the dictionary with the scenario regimes and block types.

Method List / Definition Locations

initialize_exp_queue!(eqc, scenario_dict)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/scenario.jl:56.

source
DeepART.learn!Method
learn!(
    art::DeepART.DeepHeadART,
    x::AbstractArray{T} where T<:Real,
    f1a::Tuple,
    f2a::Tuple,
    index::Integer
)

Summary

Updates the weights of both the F1 layer and F2 layer (at the index) of the DeepHeadART module.

Arguments

  • art::DeepHeadART: the DeepHeadART module.

  • activations::Tuple: the activations tuple.

  • index::Integer: the index of the node to update.

Method List / Definition Locations

learn!(art, x, f1a, f2a, index)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/DeepHeadART.jl:245.

source
DeepART.learn_SimpleDeepART!Method
learn_SimpleDeepART!(
    art::AdaptiveResonance.AbstractFuzzyART,
    x::AbstractVector{T} where T<:Real,
    index::Integer
) -> Any

Summary

In place learning function.

Arguments

  • art::AbstractFuzzyART: the FuzzyART module to update.
  • x::RealVector: the sample to learn from.
  • index::Integer: the index of the FuzzyART weight to update.

Method List / Definition Locations

learn_SimpleDeepART!(art, x, index)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/SimpleDeepART/SimpleDeepART.jl:281.

source
DeepART.load_all_datasetsFunction
load_all_datasets() -> Dict{String, DeepART.DataSplit}
load_all_datasets(
    topdir::AbstractString
) -> Dict{String, DeepART.DataSplit}
load_all_datasets(
    topdir::AbstractString,
    shuffle::Bool
) -> Dict{String, DeepART.DataSplit}
load_all_datasets(
    topdir::AbstractString,
    shuffle::Bool,
    p::Float64
) -> Dict{String, DeepART.DataSplit}

Summary

Loades the datasets from the data package experiment.

Arguments

  • topdir::AbstractString: default data_dir("data-package"), the directory containing the CSV data package files.

  • shuffle::Bool: flag for shuffling the data, default true.

  • p::Float: kwarg, the split ratio ∈ (0, 1), default 0.8.

Method List / Definition Locations

load_all_datasets()
load_all_datasets(topdir)
load_all_datasets(topdir, shuffle)
load_all_datasets(topdir, shuffle, p)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/data.jl:756.

source
DeepART.log_art_stats!Method
log_art_stats!(
    art::DeepART.DeepARTModule,
    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/DeepART/DeepART/src/lib/models/DeepART/common.jl:36.

source
DeepART.log_dataMethod
log_data(
    data_logger,
    experience::DeepART.Experience,
    results::Dict,
    params::Dict;
    status
) -> Any

Summary

Logs data from an L2 Experience.

Arguments

Method List / Definition Locations

log_data(data_logger, experience, results, params; status)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/agents.jl:218.

source
DeepART.multi_activationsMethod
multi_activations(
    art::DeepART.DeepHeadART,
    x::AbstractArray{T} where T<:Real
) -> Tuple{Union{Tuple{}, Tuple{Any, Vararg{Any}}}, Tuple{Union{Tuple{}, Tuple{Any, Vararg{Any}}}, Vector}}

Summary

Forward pass for a DeepHeadART module with activations.

Arguments

  • art::DeepHeadART: the DeepHeadART module.

  • x::RealArray: the input data.

Method List / Definition Locations

multi_activations(art, x)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/DeepHeadART.jl:205.

source
DeepART.multi_activationsMethod
multi_activations(
    field::DeepART.MultiHeadField,
    x::AbstractArray{T} where T<:Real
) -> Tuple{Union{Tuple{}, Tuple{Any, Vararg{Any}}}, Vector}

Summary

Computes the forward pass for a MultiHeadField and returns the activations of the shared and head layers.

Arguments

  • field::MultiHeadField: the MultiHeadField object.

  • x::RealArray: the input data.

Method List / Definition Locations

multi_activations(field, x)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/DeepART/MultiHeadField.jl:162.

source
DeepART.n_classorFunction
n_classor(y::AbstractVector{T} where T<:Integer) -> Any
n_classor(
    y::AbstractVector{T} where T<:Integer,
    n_class::Int64
) -> Any

Summary

Returns the number of classes given a vector of labels.

If the number of classes is provided, that is used; otherwise, the number of classes is inferred from the labels.

Arguments

  • y::IntegerVector: the vector of integer labels.
  • n_class::Int=0: the true number of classes (if known).

Method List / Definition Locations

n_classor(y)
n_classor(y, n_class)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/common.jl:59.

source
DeepART.one_hotFunction
one_hot(
    y::AbstractVector{T} where T<:Integer
) -> OneHotArrays.OneHotArray
one_hot(
    y::AbstractVector{T} where T<:Integer,
    n_class::Int64
) -> OneHotArrays.OneHotArray

Summary

One-hot encodes the vector of labels into a matrix of ones.

Arguments

  • y::IntegerVector: the vector of integer labels.
  • n_class::Int=0: the true number of classes (if known).

Method List / Definition Locations

one_hot(y)
one_hot(y, n_class)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/common.jl:101.

source
DeepART.run_scenarioMethod
run_scenario(
    agent::DeepART.Agent,
    name_map,
    data::DeepART.ClassIncrementalDataSplit,
    data_logger,
    d::AbstractDict
)

Summary

Runs an agent's scenario.

Arguments

  • agent::Agent: a struct that contains an Agent and scenario.
  • data_logger::PythonCall.Py: a l2logger object.

Method List / Definition Locations

run_scenario(agent, name_map, data, data_logger, d)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/agents.jl:249.

source
DeepART.sanitize_in_listMethod
sanitize_in_list(
    selection_type::AbstractString,
    selection,
    acceptable::Array{T, 1}
)

Summary

Sanitizes a selection within a list of acceptable options.

Arguments

  • selection_type::AbstractString: a string describing the option in case it is misused.
  • selection::Any: a single selection from a list.

Method List / Definition Locations

sanitize_in_list(selection_type, selection, acceptable)

defined at /home/runner/work/DeepART/DeepART/src/lib/l2/common.jl:66.

source
DeepART.shuffle_pairsMethod
shuffle_pairs(
    features::AbstractArray,
    labels::AbstractArray
) -> Tuple{Any, Any}

Summary

Wrapper for shuffling features and their labels.

Arguments

  • features::AbstractArray: the set of data features.
  • labels::AbstractArray: the set of labels corresponding to the features.

Method List / Definition Locations

shuffle_pairs(features, labels)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/common.jl:39.

source
DeepART.supervised_train!Function
supervised_train!(
    model::DeepART.SimpleDeepART,
    data::DeepART.SupervisedDataset
)
supervised_train!(
    model::DeepART.SimpleDeepART,
    data::DeepART.SupervisedDataset,
    n_train::Integer
)

Summary

Runs the supervised training of a SimpleDeepART module.

Arguments

  • model::SimpleDeepART: the SimpleDeepART model.

  • data::SupervisedDataset: a SupervisedDataset containing samples and their labels.

  • n_train::Integer: the upper-bound of number of samples to train, default 0.

If this is not manually set, all samples are trained upon.

Method List / Definition Locations

supervised_train!(model, data)
supervised_train!(model, data, n_train)

defined at /home/runner/work/DeepART/DeepART/src/lib/models/SimpleDeepART/SimpleDeepART.jl:189.

source
DeepART.task_incrementalizeFunction
task_incrementalize(
    data::Vector{DeepART.SupervisedDataset},
    groupings::Vector{Vector{Int64}}
) -> Vector{DeepART.SupervisedDataset}
task_incrementalize(
    data::Vector{DeepART.SupervisedDataset},
    groupings::Vector{Vector{Int64}},
    shuffle::Bool
) -> Vector{DeepART.SupervisedDataset}

Summary

Groups multiple datasets within a ClassIncrementalSupervisedDataset according to a vector of groupings.

Arguments

  • data:ClassIncrementalSupervisedDataset: the vector of datasets to group.
  • groupings::Vector{Vector{Int}}: the set of groupings to perform.
  • shuffle::Bool: flag for shuffling the data, default true.

Method List / Definition Locations

task_incrementalize(data, groupings)
task_incrementalize(data, groupings, shuffle)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/ClassIncrementalDataSplit.jl:169.

source
DeepART.term_accuracyMethod
term_accuracy(
    accs::Array{T<:Real, 1}
) -> Union{UnicodePlots.Plot{T, Val{true}} where T<:UnicodePlots.BrailleCanvas, UnicodePlots.Plot{T, Val{false}} where T<:UnicodePlots.BrailleCanvas}

Summary

Terminal plot function for a simple vector of accuracies.

Method List / Definition Locations

term_accuracy(accs)

defined at /home/runner/work/DeepART/DeepART/src/lib/plots.jl:14.

source
DeepART.text_targets_to_intsMethod
text_targets_to_ints(
    targets::Vector{String}
) -> Vector{Int64}

Summary

Converts a vector of string targets to a vector of integer targets using a target map.

Arguments

  • targets::Vector{String}: the vector of string targets to convert.
  • target_map::Dict{String, Int}: the mapping of string targets to integer targets.

Method List / Definition Locations

text_targets_to_ints(targets)

defined at /home/runner/work/DeepART/DeepART/src/lib/data/data.jl:22.

source
DeepART.train_inc!Method
train_inc!(
    art::Union{AdaptiveResonance.ARTModule, DeepART.DeepARTModule, DeepART.Hebb.BlockNet, DeepART.Hebb.HebbModel},
    tidata::DeepART.ClassIncrementalDataSplit;
    display,
    desc
) -> Vector{Vector{Int64}}

Summary

Task-incremental training/testing loop.

Arguments

  • art::DeepARTModule: the DeepARTModule model.

  • tidata::ClassIncrementalDataSplit: the task-incremental data split.

  • n_train::Integer: the number of training iterations.

Method List / Definition Locations

train_inc!(art, tidata; display, desc)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:200.

source
DeepART.tt_basic!Method
tt_basic!(
    art::Union{AdaptiveResonance.ARTModule, DeepART.DeepARTModule, DeepART.Hebb.BlockNet, DeepART.Hebb.HebbModel},
    data::DeepART.DataSplit;
    display,
    epochs
) -> Dict

Summary

Single-task training/testing loop.

Arguments

  • art::CommonARTModule: the CommonARTModule model.

  • data::DataSplit: a DataSplit container of a supervised train/test split.

  • n_train::Integer: the number of training iterations.

  • n_test::Integer: the number of testing iterations.

Method List / Definition Locations

tt_basic!(art, data; display, epochs)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:266.

source
DeepART.tt_inc!Method
tt_inc!(
    art::Union{AdaptiveResonance.ARTModule, DeepART.DeepARTModule, DeepART.Hebb.BlockNet, DeepART.Hebb.HebbModel},
    tidata::DeepART.ClassIncrementalDataSplit,
    data::DeepART.DataSplit;
    display
) -> Dict

Summary

Multi-task training/testing loop for DeepARTModules.

Arguments

  • art::DeepARTModule: the DeepARTModule model.

  • tidata::ClassIncrementalDataSplit: the task-incremental data split.

  • data::DataSplit: a DataSplit container of a supervised train/test split.

  • n_train::Integer: the number of training iterations.

  • n_test::Integer: the number of testing iterations.

Method List / Definition Locations

tt_inc!(art, tidata, data; display)

defined at /home/runner/work/DeepART/DeepART/src/lib/experiments/train-test.jl:331.

source