Developer Index
This page lists the types and functions that are internal to the DCCR
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
DCCR._save_dccr_fig
DCCR._save_dccr_table
DCCR.collect_activations
DCCR.collect_all_activations
DCCR.collect_all_activations_labeled
DCCR.create_accuracy_groupedbar
DCCR.create_boxplot
DCCR.create_comparison_groupedbar
DCCR.create_complex_condensed_plot
DCCR.create_complex_condensed_plot_alt
DCCR.create_condensed_plot
DCCR.create_confusion_heatmap
DCCR.create_custom_confusion_heatmap
DCCR.create_inverted_boxplot
DCCR.df_column_to_matrix
DCCR.dist_exp_parse
DCCR.evaluate_agent!
DCCR.exp_parse
DCCR.feature_preprocess
DCCR.fields_to_dict!
DCCR.get_accuracies
DCCR.get_argparsesettings
DCCR.get_confusion
DCCR.get_deindexed_data
DCCR.get_dist
DCCR.get_index_from_name
DCCR.get_indexed_data
DCCR.get_manual_split
DCCR.get_n_categories
DCCR.get_normalized_confusion
DCCR.get_orbit_names
DCCR.get_tt_accuracies
DCCR.handle_display
DCCR.initialize_exp_queue!
DCCR.is_complete
DCCR.json_load
DCCR.json_save
DCCR.load_default_orbit_data
DCCR.load_opts
DCCR.load_orbits
DCCR.load_sim_opts
DCCR.load_sim_results
DCCR.log_data
DCCR.pack_data
DCCR.packed_dir
DCCR.paper_results_dir
DCCR.permuted
DCCR.results_dir
DCCR.run_scenario
DCCR.safe_unpack
DCCR.sanitize_block_type
DCCR.sanitize_in_list
DCCR.sanitize_log_state
DCCR.save_dccr
DCCR.shuffle_orbits
DCCR.shuffled_mc
DCCR.sigmoid
DCCR.unpack_data
DCCR.unpacked_dir
DCCR.unsupervised_mc
Types
DCCR.Agent
DCCR.DDVFAAgent
DCCR.DDVFAAgent
DCCR.DDVFAAgent
DCCR.Data
DCCR.DataSplit
DCCR.DataSplitCombined
DCCR.DataSplitCombined
DCCR.DataSplitIndexed
DCCR.Experience
DCCR.Experience
DCCR.ExperienceQueue
DCCR.ExperienceQueueContainer
DCCR.ExperienceQueueContainer
DCCR.ExperienceQueueContainer
DCCR.Features
DCCR.LabeledDataset
DCCR.LabeledDataset
DCCR.Labels
DCCR.MatrixData
DCCR.ParsedArgs
DCCR.SequenceNums
DCCR.StatsDict
DCCR.Targets
DCCR.VectorLabeledDataset
DCCR.VectoredData
Constants
DCCR.ARG_BOUNDS
DCCR.ARG_CLASS_LABELS
DCCR.ARG_DATA_MATRIX
DCCR.ARG_DATA_SPLIT
DCCR.ARG_PERCENTAGES
DCCR.ARG_Y
DCCR.ARG_Y_HAT
DCCR.ARG_Y_HAT_TRAIN
DCCR.ARG_Y_HAT_VAL
DCCR.BLOCK_TYPES
DCCR.COMMON_DOC
DCCR.DOC_ARG_SAVE_DIR
DCCR.JSON_INDENT
DCCR.LOG_STATES
DCCR.SAVE_MAP
DCCR.n_colors
DCCR.pubu_9
DCCR.pubu_9_raw
DCCR.ylgn_9
DCCR.ylgn_9_raw
Docs
Documentation for all internal names are listed below.
DCCR.ARG_BOUNDS
— ConstantARG_BOUNDS
Description
Common docstring: the y-lim bounds for a plot.
DCCR.ARG_CLASS_LABELS
— ConstantARGCLASSLABELS
Description
Common docstring: argument for the class labels as strings used for plot axes.
DCCR.ARG_DATA_MATRIX
— ConstantARGDATAMATRIX
Description
Common docstring: argument for a set of features as a 2-D matrix.
DCCR.ARG_DATA_SPLIT
— ConstantARGDATASPLIT
Description
Common docstring: argument for the DataSplit
used for training, plotting, etc.
DCCR.ARG_PERCENTAGES
— ConstantARG_PERCENTAGES
Description
Common docstring: argument flag to use a custom percentage formatter during plotting.
DCCR.ARG_Y
— ConstantARG_Y
Description
Common docstring: argument for the true target values.
DCCR.ARG_Y_HAT
— ConstantARGYHAT
Description
Common docstring: argument for the classifier's target outputs.
DCCR.ARG_Y_HAT_TRAIN
— ConstantARGYHAT_TRAIN
Description
Common docstring: argument for the target estimates on the training data.
DCCR.ARG_Y_HAT_VAL
— ConstantARGYHAT_VAL
Description
Common docstring: argument for classifier validation data estimates.
DCCR.BLOCK_TYPES
— ConstantBLOCK_TYPES
Description
The names of the blocks that are encountered during L2 experiments.
DCCR.COMMON_DOC
— ConstantCOMMON_DOC
Description
Docstring prefix denoting that the constant is used as a common docstring element for other docstrings.
DCCR.DOC_ARG_SAVE_DIR
— ConstantDOCARGSAVE_DIR
Description
Common docstring: argument for the directory string to save to.
DCCR.JSON_INDENT
— ConstantJSON_INDENT
Description
Constant for pretty indentation spacing in JSON files.
DCCR.LOG_STATES
— ConstantLOG_STATES
Description
The enumerated states that an L2 logger log can be in.
DCCR.SAVE_MAP
— ConstantSAVE_MAP
Description
Dictionary mapping the names of result save types to the private wrapper functions that implement them.
DCCR.n_colors
— ConstantInferred number of colors used from the color palettes.
DCCR.pubu_9
— ConstantPurple-blue-9 ColorScheme
, inferred from the RGB values
DCCR.pubu_9_raw
— ConstantPurple-blue-9 raw RGB values, range [0, 1]
.
DCCR.ylgn_9
— ConstantYellow-green-9 ColorScheme
, inferred from the RGB values.
DCCR.ylgn_9_raw
— ConstantYellow-green-9 raw RGB values, range [0, 1]
.
DCCR.Agent
— Typeabstract type Agent
Summary
L2 agent supertype.
Fields
DCCR.DDVFAAgent
— Typestruct DDVFAAgent <: DCCR.Agent
Summary
DDVFA-based L2 Agent
.
Fields
agent::AdaptiveResonance.DDVFA
: The DDVFA module.
params::Dict
: Parameters used for l2logging.
scenario::DCCR.ExperienceQueueContainer
: Container for theExperience
Queue.
DCCR.DDVFAAgent
— MethodDDVFAAgent(
ddvfa_opts::AdaptiveResonance.opts_DDVFA,
scenario_dict::AbstractDict
) -> DCCR.DDVFAAgent
Summary
Constructor for a DDVFAAgent
using the scenario dictionary and optional DDVFA keyword argument options.
Arguments
opts::AbstractDict
: keyword arguments for DDVFA options.scenario::AbstractDict
: l2logger scenario as a dictionary.
Method List / Definition Locations
DDVFAAgent(ddvfa_opts, scenario_dict)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:78
.
DCCR.DDVFAAgent
— MethodDDVFAAgent(
ddvfa_opts::AdaptiveResonance.opts_DDVFA
) -> DCCR.DDVFAAgent
Summary
Creates a DDVFA agent with an empty experience queue.
Arguments
ddvfa_opts::opts_DDVFA
: the options struct used to initialize the DDVFA module and set the logging params.
Method List / Definition Locations
DDVFAAgent(ddvfa_opts)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:51
.
DCCR.Data
— Typeabstract type Data
Summary
Abstract supertype for all Data structs in this library.
Fields
DCCR.DataSplit
— Typestruct DataSplit <: DCCR.MatrixData
Summary
A basic struct for encapsulating the components of supervised training.
Fields
train::DCCR.LabeledDataset
: TrainingLabeledDataset
.
val::DCCR.LabeledDataset
: ValidationLabeledDataset
.
test::DCCR.LabeledDataset
: TestLabeledDataset
.
DCCR.DataSplitCombined
— Typestruct DataSplitCombined <: DCCR.MatrixData
Summary
A struct for combining training and validation data, containing only train and test splits.
Fields
train::DCCR.LabeledDataset
: TrainingLabeledDataset
.
test::DCCR.LabeledDataset
: TestingLabeledDataset
.
DCCR.DataSplitCombined
— MethodDataSplitCombined(
data::DCCR.DataSplit
) -> DCCR.DataSplitCombined
Summary
Constructs a DataSplitCombined from an existing DataSplit by consolidating the training and validation data.
Arguments
data::DataSplit
: theDataSplit
struct for consolidating validationFeatures
andLabels
into the training data.
Method List / Definition Locations
DataSplitCombined(data)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/data.jl:171
.
DCCR.DataSplitIndexed
— Typestruct DataSplitIndexed <: DCCR.VectoredData
Summary
A struct for encapsulating the components of supervised training in vectorized form.
Fields
train::DCCR.VectorLabeledDataset
: TrainingVectorLabeledDataset
.
val::DCCR.VectorLabeledDataset
: ValidationVectorLabeledDataset
.
test::DCCR.VectorLabeledDataset
: TestVectorLabeledDataset
.
DCCR.Experience
— Typestruct Experience
Summary
Experience block for an agent.
Taken from l2logger_template.
Fields
task_name::String
: The task name.
seq_nums::DCCR.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).
DCCR.Experience
— MethodExperience(
task_name::AbstractString,
seq_nums::DCCR.SequenceNums,
block_type::AbstractString
) -> DCCR.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 theExperience
.block_type::AbstractString
: the block type ∈ ["train", "test"]. Using "train" setsupdate_model
to true, "test" to false.
Method List / Definition Locations
Experience(task_name, seq_nums, block_type)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/experience.jl:76
.
DCCR.ExperienceQueue
— TypeDCCR.ExperienceQueueContainer
— Typestruct ExperienceQueueContainer
Summary
Container for the ExperienceQueue
and some statistics about it.
Fields
queue::DataStructures.Deque{DCCR.Experience}
: TheExperienceQueue
itself.
stats::Dict{String, Any}
: The statistics about the queue. NOTE These statistics reflect the queue at construction, not after any processing.
DCCR.ExperienceQueueContainer
— MethodExperienceQueueContainer(
scenario_dict::AbstractDict
) -> DCCR.ExperienceQueueContainer
Summary
Creates a queue of Experience
s from the scenario dictionary.
Arguments
scenario_dict::AbstractDict
: the scenario dictionary.
Method List / Definition Locations
ExperienceQueueContainer(scenario_dict)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/scenario.jl:135
.
DCCR.ExperienceQueueContainer
— MethodExperienceQueueContainer() -> DCCR.ExperienceQueueContainer
Summary
Creates an empty ExperienceQueueContainer
with an empty queue and zeroed stats.
Method List / Definition Locations
ExperienceQueueContainer()
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/scenario.jl:110
.
DCCR.Features
— TypeFeatures
Description
Definition of features as a matrix of floating-point numbers of dimension (featuredim, nsamples).
DCCR.LabeledDataset
— Typestruct LabeledDataset
Summary
A single dataset of Features
, Targets
, and human-readable string Labels
.
Fields
x::Matrix{Float64}
: Collection ofFeatures
in the labeled dataset.
DCCR.LabeledDataset
— MethodLabeledDataset(
d1::DCCR.LabeledDataset,
d2::DCCR.LabeledDataset
) -> DCCR.LabeledDataset
Summary
A constructor for a LabeledDataset
that merges two other LabeledDataset
s.
Arguments
d1::LabeledDataset
: the firstLabeledDataset
to consolidate.d2::LabeledDataset
: the secondLabeledDataset
to consolidate.
Method List / Definition Locations
LabeledDataset(d1, d2)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/data.jl:156
.
DCCR.Labels
— TypeLabels
Description
Definition of labels as a vector of strings.
DCCR.MatrixData
— Typeabstract type MatrixData <: DCCR.Data
Summary
Abstract type for Data structs that represent features as matrices.
Fields
DCCR.ParsedArgs
— TypeParsedArgs
Description
Type alias for how parsed arguments are treated.
DCCR.SequenceNums
— Typestruct 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.
DCCR.StatsDict
— TypeStatsDict
Description
Alias for a statistics dictionary being string keys mapping to any object.
DCCR.Targets
— TypeTargets
Description
Definition of targets as a vector of integers.
DCCR.VectorLabeledDataset
— Typestruct VectorLabeledDataset
Summary
A single dataset of vectored labeled data with Features
, Targets
, and human-readable string Labels
.
Fields
x::Vector{Matrix{Float64}}
: A vector ofFeatures
matrices.
DCCR.VectoredData
— Typeabstract type VectoredData <: DCCR.Data
Summary
Abstract type for Data structs that represent features as vectors of matrices.
Fields
Base.show
— Methodshow(io::IO, agent::DCCR.DDVFAAgent)
Summary
Overload of the show function for DDVFAAgent
.
Arguments
io::IO
: the current IO stream.cont::DDVFAAgent
: theDDVFAAgent
to print/display.
Method List / Definition Locations
show(io, agent)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:98
.
Base.show
— Methodshow(io::IO, cont::DCCR.ExperienceQueueContainer)
Summary
Overload of the show function for ExperienceQueueContainer
.
Arguments
io::IO
: the current IO stream.cont::ExperienceQueueContainer
: theExperienceQueueContainer
to print/display.
Method List / Definition Locations
show(io, cont)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/scenario.jl:175
.
Base.show
— Methodshow(io::IO, queue::DataStructures.Deque{DCCR.Experience})
Summary
Overload of the show function for ExperienceQueue
.
Arguments
io::IO
: the current IO stream.cont::ExperienceQueueContainer
: theExperienceQueueContainer
to print/display.
Method List / Definition Locations
show(io, queue)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/scenario.jl:157
.
DCCR._save_dccr_fig
— Method_save_dccr_fig(fig, dir::AbstractString) -> Any
Summary
Wrapper for how figures are saved in the DCCR project.
Arguments
fig
: the figure object to save.dir::AbstractString
: the directory to save to.
Method List / Definition Locations
_save_dccr_fig(fig, dir)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:19
.
DCCR._save_dccr_table
— Method_save_dccr_table(table, dir::AbstractString) -> Any
Summary
Wrapper for how tables are saved in the DCCR project.
Arguments
table
: the table object to save.dir::AbstractString
: the directory to save to.
Method List / Definition Locations
_save_dccr_table(table, dir)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:30
.
DCCR.collect_activations
— Methodcollect_activations(data_dir::AbstractString) -> Any
Summary
Returns the activations from a single directory.
Arguments
data_dir::AbstractString
: the single data directory to load the features from.
Method List / Definition Locations
collect_activations(data_dir)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:31
.
DCCR.collect_all_activations
— Methodcollect_all_activations(
data_dirs::AbstractArray,
cell::Integer
) -> Any
Summary
Return just the yolo activations from a list of data directories.
Arguments
data_dirs::AbstractArray
: the data directories to load the yolo activations from.cell::Integer
: the number of cells corresponding to the windowing procedure.
Method List / Definition Locations
collect_all_activations(data_dirs, cell)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:43
.
DCCR.collect_all_activations_labeled
— Methodcollect_all_activations_labeled(
data_dirs::Vector{String},
cell::Integer
) -> Tuple{Any, Vector{Int64}, Vector{String}}
Summary
Return the yolo activations, training targets, and condensed labels list from a list of data directories.
Arguments
data_dirs::Vector{String}
: the directories to load the data from.cell::Integer
: the number of cells to use in the windowed averaging procedure.
Method List / Definition Locations
collect_all_activations_labeled(data_dirs, cell)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:64
.
DCCR.create_accuracy_groupedbar
— Methodcreate_accuracy_groupedbar(
data::DCCR.DataSplit,
y_hat_train::AbstractVector{T} where T<:Integer,
y_hat::AbstractVector{T} where T<:Integer,
class_labels::Vector{String};
percentages
) -> Plots.Plot
Summary
Return a grouped bar chart with class accuracies.
Arguments
data::DataSplit
: the original dataset with a train, val, and test split.y_hat_train::IntegerVector
: the classifier estimates from the training data.y_hat::IntegerVector
: the approximated targets generated by the classifier.class_labels::Vector{String}
: the string labels to use for the plot axes.percentages::Bool=false
: optional, flag to use the custom percentage formatter or not.
Method List / Definition Locations
create_accuracy_groupedbar(
data,
y_hat_train,
y_hat,
class_labels;
percentages
)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:738
.
DCCR.create_boxplot
— Methodcreate_boxplot(
data::AbstractMatrix{T} where T<:Real,
class_labels::Vector{String};
percentages,
bounds,
violin_bandwidth
) -> Any
Summary
Return a colored and formatted boxplot of the data.
Arguments
data::RealMatrix
: the data as a 2-D matrix of real values.class_labels::Vector{String}
: the string labels to use for the plot axes.percentages::Bool=false
: optional, flag to use the custom percentage formatter or not.bounds::Tuple{Float, Float}=(0.45, 1.0)
: optional, the bounds for the y-lim bounds of the plot.violin_bandwidth::Real=0.01
: the bandwidth parameter passed to the violin plot.
Method List / Definition Locations
create_boxplot(
data,
class_labels;
percentages,
bounds,
violin_bandwidth
)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:868
.
DCCR.create_comparison_groupedbar
— Methodcreate_comparison_groupedbar(
data::DCCR.DataSplit,
y_hat_val::AbstractVector{T} where T<:Integer,
y_hat::AbstractVector{T} where T<:Integer,
class_labels::Vector{String};
percentages,
extended
) -> Plots.Plot
Summary
Return a grouped bar chart with comparison bars.
Arguments
data::DataSplit
: the original dataset with a train, val, and test split.y_hat_val::IntegerVector
: the classifier estimates from the validation data.y_hat::IntegerVector
: the approximated targets generated by the classifier.class_labels::Vector{String}
: the string labels to use for the plot axes.percentages::Bool=false
: optional, flag to use the custom percentage formatter or not.extended::Bool=false
: if the plot needs to be extended to another category, compensating for misclassification.``
Method List / Definition Locations
create_comparison_groupedbar(
data,
y_hat_val,
y_hat,
class_labels;
percentages,
extended
)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:795
.
DCCR.create_complex_condensed_plot
— Functioncreate_complex_condensed_plot(
perfs,
vals,
class_labels
) -> Tuple{Plots.Plot, Any}
create_complex_condensed_plot(
perfs,
vals,
class_labels,
percentages::Bool
) -> Tuple{Plots.Plot, Any}
Summary
Create and return a complex condensed scenario plot.
Method List / Definition Locations
create_complex_condensed_plot(perfs, vals, class_labels)
create_complex_condensed_plot(
perfs,
vals,
class_labels,
percentages
)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1046
.
DCCR.create_complex_condensed_plot_alt
— Functioncreate_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/DCCR/DCCR/src/lib/c3/functions.jl:1118
.
DCCR.create_condensed_plot
— Functioncreate_condensed_plot(perfs, class_labels) -> Plots.Plot
create_condensed_plot(
perfs,
class_labels,
percentages::Bool
) -> Plots.Plot
Summary
Create and return a simplified condensed scenario plot.
Method List / Definition Locations
create_condensed_plot(perfs, class_labels)
create_condensed_plot(perfs, class_labels, percentages)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1005
.
DCCR.create_confusion_heatmap
— Methodcreate_confusion_heatmap(
class_labels::Vector{String},
y::AbstractVector{T} where T<:Integer,
y_hat::AbstractVector{T} where T<:Integer
) -> Plots.Plot
Summary
Returns a handle to a labeled and annotated heatmap plot of the confusion matrix.
Arguments
class_labels::Vector{String}
: the string labels to use for the plot axes.y::IntegerVector
: the true targets as integers.y_hat::IntegerVector
: the approximated targets generated by the classifier.
Method List / Definition Locations
create_confusion_heatmap(class_labels, y, y_hat)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:580
.
DCCR.create_custom_confusion_heatmap
— Methodcreate_custom_confusion_heatmap(
class_labels::Vector{String},
norm_cm::AbstractMatrix{T} where T<:Real
) -> Plots.Plot
Summary
Returns a handle to a labeled and annotated heatmap plot of the confusion matrix.
Arguments
class_labels::Vector{String}
: the string labels to use for the plot axes.norm_cm::RealMatrix
: the normalized confuction matrix to plot as a heatmap.
Method List / Definition Locations
create_custom_confusion_heatmap(class_labels, norm_cm)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:658
.
DCCR.create_inverted_boxplot
— Methodcreate_inverted_boxplot(
data::AbstractMatrix{T} where T<:Real,
class_labels::Vector{String};
percentages,
bounds
) -> Any
Summary
Return a colored and formatted boxplot of the data.
Arguments
data::RealMatrix
: the data as a 2-D matrix of real values.class_labels::Vector{String}
: the string labels to use for the plot axes.percentages::Bool=false
: optional, flag to use the custom percentage formatter or not.bounds::Tuple{Float, Float}=(0.45, 1.0)
: optional, the bounds for the y-lim bounds of the plot.
Method List / Definition Locations
create_inverted_boxplot(
data,
class_labels;
percentages,
bounds
)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:937
.
DCCR.df_column_to_matrix
— Methoddf_column_to_matrix(
df::DataFrames.DataFrame,
row::Symbol
) -> Any
Summary
Convert a column of lists in a DataFrame into a matrix for analysis.
Arguments
df::DataFrame
: the DataFrame containing the column of lists.row::Symbol
: the symbolic name of the row in the DataFrame to convert into a matrix.
Method List / Definition Locations
df_column_to_matrix(df, row)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:494
.
DCCR.dist_exp_parse
— Functiondist_exp_parse() -> Any
dist_exp_parse(description::AbstractString) -> Any
Summary
Parses the command line for common options in distributed experiments.
Arguments
description::AbstractString
: optional positional, the script description for the parser
Method List / Definition Locations
dist_exp_parse()
dist_exp_parse(description)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:141
.
DCCR.evaluate_agent!
— Methodevaluate_agent!(
agent::DCCR.Agent,
experience::DCCR.Experience,
data::DCCR.VectoredData
) -> Dict
Summary
Evaluates a single agent on a single experience, training or testing as needed.
Arguments
agent::Agent
: theAgent
to evaluate.exp::Experience
: theExperience
to use for training/testing.
Method List / Definition Locations
evaluate_agent!(agent, experience, data)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:149
.
DCCR.exp_parse
— Functionexp_parse() -> Any
exp_parse(description::AbstractString) -> Any
Summary
Parses the command line for common options in serial (non-distributed) experiments.
Arguments
description::AbstractString
: optional positional, the script description for the parser
Method List / Definition Locations
exp_parse()
exp_parse(description)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:115
.
DCCR.feature_preprocess
— Methodfeature_preprocess(
dt::StatsBase.ZScoreTransform,
scaling::Real,
data::AbstractMatrix{T} where T<:Real
) -> Any
Summary
Preprocesses one dataset of features, scaling and squashing along the feature axes.
Arguments
dt::ZScoreTransform
: the Gaussian statistics of the features.scaling::Real
: the sigmoid scaling parameter.data::RealMatrix
: the 2-D matrix of features to transform.
Method List / Definition Locations
feature_preprocess(dt, scaling, data)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:120
.
DCCR.fields_to_dict!
— Methodfields_to_dict!(dict::AbstractDict, opts)
Summary
Adds entry to a dictionary from a struct with fields.
Meant to be used with StatsDict
.
Arguments
dict::AbstractDict
: theStatsDict
dictionary to add entries to.opts::Any
: a struct containing fields, presumably of options, to add as key-value entries to the dict.
Method List / Definition Locations
fields_to_dict!(dict, opts)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/scenario.jl:205
.
DCCR.get_accuracies
— Methodget_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/DCCR/DCCR/src/lib/c3/functions.jl:413
.
DCCR.get_argparsesettings
— Functionget_argparsesettings() -> Any
get_argparsesettings(description::AbstractString) -> Any
Summary
Common function for how ArgParseSettings
are generated in the project.
Arguments
description::AbstractString
: optional positional, the script description for the parser
Method List / Definition Locations
get_argparsesettings()
get_argparsesettings(description)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:99
.
DCCR.get_confusion
— Methodget_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/DCCR/DCCR/src/lib/c3/functions.jl:385
.
DCCR.get_deindexed_data
— Methodget_deindexed_data(
data::DCCR.DataSplitIndexed,
order::AbstractVector{T} where T<:Integer
) -> DCCR.DataSplit
Summary
Turn a DataSplitIndexed into a DataSplit with the given train/test order.
Arguments
data::DataSplitIndexed
: the indexed data to consolidate back into a DataSplit.order::IntegerVector
: the order used by the indexed data for correctly deindexing.
Method List / Definition Locations
get_deindexed_data(data, order)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:284
.
DCCR.get_dist
— Methodget_dist(
data::AbstractMatrix{T} where T<:Real
) -> StatsBase.ZScoreTransform
Summary
Get the distribution parameters for preprocessing.
Arguments
data::RealMatrix
: a 2-D matrix of features for computing the Gaussian statistics of.
Method List / Definition Locations
get_dist(data)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:108
.
DCCR.get_index_from_name
— Methodget_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/DCCR/DCCR/src/lib/l2/agents.jl:131
.
DCCR.get_indexed_data
— Methodget_indexed_data(
data::DCCR.DataSplit
) -> DCCR.DataSplitIndexed
Summary
Create a DataSplitIndexed object from a DataSplit.
Arguments
data::DataSplit
: the DataSplit to separate into vectors of matrices.
Method List / Definition Locations
get_indexed_data(data)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:224
.
DCCR.get_manual_split
— Methodget_manual_split(
data::AbstractMatrix{T} where T<:Real,
targets::AbstractVector{T} where T<:Integer
)
Summary
Wrapper of splitobs
, returns a manual train/test x/y split from a data matrix and labels using MLDataUtils.
Arguments
data::RealMatrix
: the feature data to split into training and testing.targets::IntegerVector
: the labels corresponding to the data to split into training and testing.
Method List / Definition Locations
get_manual_split(data, targets)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:482
.
DCCR.get_n_categories
— Methodget_n_categories(
ddvfa::AdaptiveResonance.DDVFA,
n_classes::Int64
) -> Tuple{Vector{Int64}, Vector{Int64}}
Summary
Returns both the number of F2 categories and total number of weights per class as two lists.
Arguments
ddvfa::DDVFA
: the DDVFA module to calculate the statistics for.n_classes::Int
: the number of target classes that the model was trained upon.
Method List / Definition Locations
get_n_categories(ddvfa, n_classes)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:455
.
DCCR.get_normalized_confusion
— Methodget_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/DCCR/DCCR/src/lib/c3/functions.jl:397
.
DCCR.get_orbit_names
— Methodget_orbit_names(
selection::Vector{String}
) -> Tuple{Vector{String}, Vector{String}}
Summary
Map the experiment orbit names to their data directories and plotting class labels.
Arguments
selection::Vector{String}
: the selection of labels corresponding to both data directories and plotting labels.
Method List / Definition Locations
get_orbit_names(selection)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:339
.
DCCR.get_tt_accuracies
— Methodget_tt_accuracies(
data::DCCR.MatrixData,
y_hat_train::AbstractVector{T} where T<:Integer,
y_hat::AbstractVector{T} where T<:Integer,
n_classes::Integer
) -> Tuple{Any, Any}
Summary
Get two lists of the training and testing accuracies.
Arguments
data::MatrixData
: the training and testing dataset, containing a vector of training and testing labelsdata.train.y
anddata.test.y
.y_hat_train::IntegerVector
: the training estimates.y_hat::IntegerVector
: the agent's estimates.n_classes::Integer
: the number of total classes in the test set.
Method List / Definition Locations
get_tt_accuracies(data, y_hat_train, y_hat, n_classes)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:432
.
DCCR.handle_display
— Methodhandle_display(
p::Plots.Plot,
pargs::Dict{String, Any}
) -> Any
Summary
Handles the display of plots according to arguments parsed by the script.
Arguments
p::Plots.Plot
: the plot handle to display if necessary.pargs::ParsedArgs
: the parsed arguments provided by the script.
Method List / Definition Locations
handle_display(p, pargs)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:217
.
DCCR.initialize_exp_queue!
— Methodinitialize_exp_queue!(
eqc::DCCR.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/DCCR/DCCR/src/lib/l2/scenario.jl:56
.
DCCR.is_complete
— Methodis_complete(agent::DCCR.Agent) -> Bool
Summary
Checks if the Agent
is done with its scenario queue.
Arguments
agent::Agent
: the agent to test scenario completion on.
Method List / Definition Locations
is_complete(agent)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:118
.
DCCR.json_load
— Methodjson_load(filepath::AbstractString) -> Any
Summary
Loads the JSON file, interpreted as a dictionary.
Arguments
filepath::AbstractString
: the full file name (with path) to load.
Method List / Definition Locations
json_load(filepath)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/common.jl:93
.
DCCR.json_save
— Methodjson_save(filepath::AbstractString, dict::AbstractDict)
Summary
Saves the dictionary to a JSON file.
Arguments
filepath::AbstractString
: the full file name (with path) to save to.dict::AbstractDict
: the dictionary to save to the file.
Method List / Definition Locations
json_save(filepath, dict)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/common.jl:80
.
DCCR.load_default_orbit_data
— Methodload_default_orbit_data(
data_dir::AbstractString;
scaling
) -> Tuple{DCCR.DataSplit, DCCR.DataSplitIndexed, Vector{String}, Vector{String}, Int64}
Summary
Loads the default orbit data configuration.
Arguments
data_dir::AbstractString
: the relative/absolute directory containing the data.scaling::Float
: the sigmoid scaling parameter, defaultscaling=2.0
Method List / Definition Locations
load_default_orbit_data(data_dir; scaling)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1539
.
DCCR.load_opts
— Methodload_opts(file::AbstractString) -> Any
Summary
Loads the provided options YAML file.
Arguments
file::AbstractString
: the YAML file to load.
Method List / Definition Locations
load_opts(file)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:170
.
DCCR.load_orbits
— Methodload_orbits(
data_dir::AbstractString,
data_dirs::Vector{String},
scaling::Real
) -> DCCR.DataSplit
Summary
Load the orbits data and preprocess the features.
Arguments
data_dir::AbstractString
: the top-level data directory.data_dirs::Vector{String}
: the subfolders to load.scaling::Real
: the sigmoidal scaling parameter to use.
Method List / Definition Locations
load_orbits(data_dir, data_dirs, scaling)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:137
.
DCCR.load_sim_opts
— Functionload_sim_opts() -> Any
load_sim_opts(file::AbstractString) -> Any
Summary
Loads and returns the simulation options from the provided YAML file.
Arguments
file::AbstractString="default.yml"
: options the file to load from the options directory.
Method List / Definition Locations
load_sim_opts()
load_sim_opts(file)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:187
.
DCCR.load_sim_results
— Methodload_sim_results(data_file::AbstractString, args...) -> Any
Summary
Wrapper for loading simulation results with arbitrarily many fields.
Arguments
data_file::AbstractString
: the location of the datafile for loading.args...
: the string names of the files to open.
Method List / Definition Locations
load_sim_results(data_file, args)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:229
.
DCCR.log_data
— Methodlog_data(
data_logger::PyCall.PyObject,
experience::DCCR.Experience,
results::Dict,
params::Dict;
status
) -> Any
Summary
Logs data from an L2 Experience
.
Arguments
data_logger::PyObject
: the l2logger DataLogger.exp::Experience
: theExperience
that theAgent
just processed.results::Dict
: the results from theAgent
'sExperience
.status::AbstractString
: string expressing if theExperience
was processed.
Method List / Definition Locations
log_data(data_logger, experience, results, params; status)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:187
.
DCCR.pack_data
— Methodpack_data(experiment_name::AbstractString) -> String
Summary
Packs the data under the provided experiment name folder into an LFS-tracked tarball.
Arguments
experiment_name::AbstractString
: the name of the file destination to pack from theunpacked_dir
to thepacked_dir
.
Method List / Definition Locations
pack_data(experiment_name)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1501
.
DCCR.packed_dir
— Methodpacked_dir(args...) -> String
Summary
The packed data directory as a DrWatson-style path function.
Arguments
args...
: string arguments a subsequent file or folders.
Method List / Definition Locations
packed_dir(args)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1485
.
DCCR.paper_results_dir
— Methodpaper_results_dir(args...) -> String
Summary
DrWatson
-style paper results directory.
Method List / Definition Locations
paper_results_dir(args)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:62
.
DCCR.permuted
— Methodpermuted(
d::Dict,
data_indexed::DCCR.DataSplitIndexed,
opts::AdaptiveResonance.opts_DDVFA
) -> Dict
Summary
Runs a single Monte Carlo simulation of training/testing on shuffled samples.
Arguments
d::Dict
: a logging dictionary storing simulation parameters.data::DataSplitIndexed
: an indexed train/test split of features and labels.opts::opts_DDVFA
: the options for DDVFA construction.
Method List / Definition Locations
permuted(d, data_indexed, opts)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1317
.
DCCR.results_dir
— Methodresults_dir(args...) -> String
Summary
DrWatson
-style local results directory.
Method List / Definition Locations
results_dir(args)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:57
.
DCCR.run_scenario
— Methodrun_scenario(
agent::DCCR.Agent,
data::DCCR.VectoredData,
data_logger::PyCall.PyObject
)
Summary
Runs an agent's scenario.
Arguments
agent::Agent
: a struct that contains anAgent
andscenario
.data_logger::PyObject
: a l2logger object.
Method List / Definition Locations
run_scenario(agent, data, data_logger)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/agents.jl:211
.
DCCR.safe_unpack
— Methodsafe_unpack(
experiment_name::AbstractString
) -> Union{Nothing, String}
Summary
If the provided experiment unpacked directory does not exist, this unpacks it.
Arguments
experiment_name::AbstractString
: the name of the file to unpack from thepacked_dir
to theunpacked_dir
.
Method List / Definition Locations
safe_unpack(experiment_name)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1525
.
DCCR.sanitize_block_type
— Methodsanitize_block_type(block_type::AbstractString)
Summary
Sanitize the selected block type against the BLOCK_TYPES
constant.
Arguments
block_type::AbstractString
: the selected block type.
Method List / Definition Locations
sanitize_block_type(block_type)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/common.jl:57
.
DCCR.sanitize_in_list
— Methodsanitize_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/DCCR/DCCR/src/lib/l2/common.jl:42
.
DCCR.sanitize_log_state
— Methodsanitize_log_state(log_state::AbstractString)
Summary
Sanitize the selected log state against the LOG_STATES
constant.
Arguments
log_state::AbstractString
: the selected log state.
Method List / Definition Locations
sanitize_log_state(log_state)
defined at /home/runner/work/DCCR/DCCR/src/lib/l2/common.jl:68
.
DCCR.save_dccr
— Methodsave_dccr(
type::AbstractString,
object,
exp_name::AbstractString,
save_name::AbstractString;
to_paper
) -> Any
Summary
Saving function for results in the DCCR project.
This function dispatches to the correct private wrapper saving function via the type
option, and the to_paper
flag determines if the result is also saved to a secondary location, which is mainly used for also saving the result to the cloud location for the journal paper.
Arguments
type::AbstractString
: the type of object being saved (seeSAVE_MAP
).object
: the object to save astype
, whether a figure, table, or something else.exp_name::AbstractString
: the name of the experiment, used for the final saving directories.save_name::AbstractString
: the name of the save file itself.to_paper::Bool=false
: optional, flag for saving to the paper results directory (defaultfalse
).
Method List / Definition Locations
save_dccr(type, object, exp_name, save_name; to_paper)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/utils.jl:77
.
DCCR.shuffle_orbits
— Methodshuffle_orbits(data::DCCR.DataSplit) -> DCCR.DataSplit
Summary
Shuffles the training orbits data.
Arguments
data::DataSplit
: theDataSplit
orbits data coming fromload_orbits
.
Method List / Definition Locations
shuffle_orbits(data)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:197
.
DCCR.shuffled_mc
— Methodshuffled_mc(
d::Dict,
data::DCCR.DataSplit,
opts::AdaptiveResonance.opts_DDVFA
)
Summary
Runs a single Monte Carlo simulation of training/testing on shuffled samples.
Arguments
d::Dict
: a logging dictionary storing simulation parameters.data::DataSplit
: a train/test split of features and labels.opts::opts_DDVFA
: the options for DDVFA construction.
Method List / Definition Locations
shuffled_mc(d, data, opts)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1252
.
DCCR.sigmoid
— Methodsigmoid(x::Real) -> Any
Summary
Returns the sigmoid function on x.
Arguments
x::Real
: the float or int to compute the sigmoid function upon.
Method List / Definition Locations
sigmoid(x)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:21
.
DCCR.unpack_data
— Methodunpack_data(experiment_name::AbstractString) -> String
Summary
Unpacks data at the provided experiment name tarball into a working directory.
Arguments
experiment_name::AbstractString
: the name of the file to unpack from thepacked_dir
to theunpacked_dir
.
Method List / Definition Locations
unpack_data(experiment_name)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1513
.
DCCR.unpacked_dir
— Methodunpacked_dir(args...) -> String
Summary
The unpacked data directory as a DrWatson-style path function.
Arguments
args...
: string arguments a subsequent file or folders.
Method List / Definition Locations
unpacked_dir(args)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1493
.
DCCR.unsupervised_mc
— Methodunsupervised_mc(
d::Dict,
data::DCCR.DataSplitCombined,
opts::AdaptiveResonance.opts_DDVFA
) -> Dict
Summary
Runs a single Monte Carlo simulation of supervised training and unsupervised training/testing.
Arguments
d::Dict
: a logging dictionary storing simulation parameters.data::DataSplitCombined
: a train/test split of features and labels.opts::opts_DDVFA
: the options for DDVFA construction.
Method List / Definition Locations
unsupervised_mc(d, data, opts)
defined at /home/runner/work/DCCR/DCCR/src/lib/c3/functions.jl:1381
.