Developer Index
This page lists the types and functions that are internal to the CFAR 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
CFAR._save_plotCFAR._save_tableCFAR.conda_gc_disableCFAR.conda_gc_enableCFAR.conda_runCFAR.conda_setupCFAR.config_dirCFAR.config_to_paramsCFAR.cvi_expCFAR.data_dirCFAR.deserialize_df!CFAR.deserialize_featuresCFAR.dist_exp_parseCFAR.evaluate_agent!CFAR.exp_parseCFAR.feature_preprocessCFAR.fields_to_dict!CFAR.gen_gaussiansCFAR.gen_gaussiansCFAR.gen_scenarioCFAR.gen_scenariosCFAR.gen_sct_gaussiansCFAR.gen_sct_gaussiansCFAR.get_argparsesettingsCFAR.get_distCFAR.get_distsCFAR.get_gaussian_configCFAR.get_index_from_nameCFAR.get_manual_splitCFAR.get_mlpCFAR.get_mover_dataCFAR.get_mover_directionCFAR.get_mover_lineCFAR.get_n_procsCFAR.get_pylibCFAR.get_shiftCFAR.get_table_rowCFAR.get_windowsCFAR.get_xCFAR.get_yCFAR.initialize_exp_queue!CFAR.is_completeCFAR.json_loadCFAR.json_saveCFAR.load_allCFAR.load_art_sim_optsCFAR.load_configCFAR.load_datasetCFAR.load_datasetsCFAR.load_mlp_sim_optsCFAR.load_moversplitCFAR.load_optsCFAR.load_vec_datasetsCFAR.log_dataCFAR.paper_results_dirCFAR.plot_2d_attrsCFAR.plot_2d_errlinesCFAR.plot_2d_errlines_doubleCFAR.plot_2d_errlines_overlayCFAR.plot_covellipsesCFAR.plot_moverCFAR.plot_moverCFAR.results_dirCFAR.run_expCFAR.run_scenarioCFAR.sanitize_block_typeCFAR.sanitize_in_listCFAR.sanitize_log_stateCFAR.save_allCFAR.save_plotCFAR.save_simCFAR.scatter_gaussian!CFAR.setup_local_pylibCFAR.shift_moverCFAR.shift_moverCFAR.sigmoidCFAR.sliding_avgCFAR.split_dataCFAR.split_datasetsCFAR.train_test_mlp_mcCFAR.train_test_sfam_mcCFAR.vec_vec_to_matrixCFAR.vectorize_datasetsCFAR.work_dir
Types
CFAR.AbstractAgentCFAR.AgentCFAR.AgentCFAR.AgentCFAR.ConfigDictCFAR.DSICCFAR.DSICCFAR.DataSplitCFAR.DataSplitCombinedCFAR.DataSplitCombinedCFAR.DataSplitIndexedCFAR.ExperienceCFAR.ExperienceCFAR.ExperienceQueueCFAR.ExperienceQueueContainerCFAR.ExperienceQueueContainerCFAR.ExperienceQueueContainerCFAR.FeaturesCFAR.LabelCFAR.LabeledDatasetCFAR.LabelsCFAR.MatrixDataCFAR.MoverSplitCFAR.MoverSplitCFAR.OptionStringCFAR.SCTMoverSplitCFAR.SCTMoverSplitCFAR.SampleCFAR.SamplesCFAR.SequenceNumsCFAR.SerializedFeaturesCFAR.SerializedFeaturesCFAR.StatsDictCFAR.TTDatasetCFAR.TargetCFAR.TargetsCFAR.VectorLabeledDatasetCFAR.VectorLabeledDatasetCFAR.VectoredData
Constants
CFAR.ALPHABETCFAR.ARG_CONFIG_DICTCFAR.ARG_CONFIG_FILECFAR.ARG_FILENAMECFAR.ARG_PCFAR.ARG_PLOTCFAR.ARG_SIM_DCFAR.ARG_SIM_DIR_FUNCCFAR.ARG_SIM_MSCFAR.ARG_SIM_OPTSCFAR.BLOCK_TYPESCFAR.COLORSCHEMECFAR.COMMON_DOCCFAR.DEFAULT_ART_OPTS_FILECFAR.DEFAULT_MLP_OPTS_FILECFAR.DEFAULT_N_PROCSCFAR.DPICFAR.DRWATSON_ARGS_DOCCFAR.FONTFAMILYCFAR.GRADIENTSCHEMECFAR.JSON_INDENTCFAR.LETTER_VECCFAR.LOCAL_PYTHON_LIBSCFAR.LOCAL_PYTHON_LIB_LOCATIONCFAR.LOG_STATESCFAR.MLPCFAR.MS_GROUPCFAR.PUBU_9CFAR.PUBU_9_RAWCFAR.SAVE_MAPCFAR.SERIALIZED_FIELDSCFAR.YLGN_9CFAR.YLGN_9_RAW
Docs
Documentation for all internal names are listed below.
CFAR.ALPHABET — ConstantALPHABET
Description
Vector of alphabetical letters as Strings for discretized feature labels.
CFAR.ARG_CONFIG_DICT — ConstantARGCONFIGDICT
Description
Common docstring: config dictionary argument.
CFAR.ARG_CONFIG_FILE — ConstantARGCONFIGFILE
Description
Common docstring: config filename argument.
CFAR.ARG_FILENAME — ConstantARG_FILENAME
Description
Common docstring: argument for a file name.
CFAR.ARG_P — ConstantARG_P
Description
Common docstring: argument for a split ratio p.
CFAR.ARG_PLOT — ConstantARG_PLOT
Description
Common docstring: argument for an existing Plots.Plot object to plot atop.
CFAR.ARG_SIM_D — ConstantARGSIMD
Description
Common docstring: argument for the simulation options dictionary.
CFAR.ARG_SIM_DIR_FUNC — ConstantARGSIMDIR_FUNC
Description
Common docstring: argument for a directory function
CFAR.ARG_SIM_MS — ConstantCFAR.ARG_SIM_OPTS — ConstantARGSIMOPTS
Description
Common docstring: argument for additional simulation options.
CFAR.BLOCK_TYPES — ConstantBLOCK_TYPES
Description
The names of the blocks that are encountered during L2 experiments.
CFAR.COLORSCHEME — ConstantCOLORSCHEME
Description
Plotting colorscheme.
CFAR.COMMON_DOC — ConstantCOMMON_DOC
Description
Docstring prefix denoting that the constant is used as a common docstring element for other docstrings.
CFAR.DEFAULT_ART_OPTS_FILE — ConstantLocation of the ART options file for simulations.
CFAR.DEFAULT_MLP_OPTS_FILE — ConstantLocation of the MLP options file for simulations.
CFAR.DEFAULT_N_PROCS — ConstantThe default number of processes to start in distributed experiments on different platforms.
CFAR.DPI — ConstantThe default plotting dots-per-inch for saving.
CFAR.DRWATSON_ARGS_DOC — ConstantDRWATSONARGSDOC
Description
Common docstring: the arguments to DrWatson-style directory functions.
CFAR.FONTFAMILY — ConstantFONTFAMILY
Description
Plotting fontfamily for all text.
CFAR.GRADIENTSCHEME — ConstantGRADIENTSCHEME
Description
Gradient scheme from a given color scheme
CFAR.JSON_INDENT — ConstantJSON_INDENT
Description
Constant for pretty indentation spacing in JSON files.
CFAR.LETTER_VEC — ConstantLETTER_VEC
Description
Two-letter alphabetical feature names.
CFAR.LOCAL_PYTHON_LIBS — ConstantList of names of local libraries to make sure to install during setup.
CFAR.LOCAL_PYTHON_LIB_LOCATION — ConstantLocation of the local Python libraries that are included in the project.
CFAR.LOG_STATES — ConstantLOG_STATES
Description
The enumerated states that an L2 logger log can be in.
CFAR.MLP — ConstantName of the MLP library.
CFAR.MS_GROUP — ConstantMS_GROUP
Description
Constant name for the JLD2/H5 group that data is saved to and loaded from.
Arguments
ms::MoverSplit: theMoverSplitdataset to save.filename::AbstractString: the full file path as a string.
CFAR.OptionString — TypeOptionString
Description
Alias for an option of type Union{AbstractString, Nothing}.
CFAR.PUBU_9 — ConstantPUBU_9
Description
Purple-blue-9 color scheme.
CFAR.PUBU_9_RAW — ConstantPUBU9RAW
Description
Purple-blue-9 raw RGB values, range [0, 1].
CFAR.SAVE_MAP — ConstantSAVE_MAP
Description
Dictionary mapping the names of result save types to the private wrapper functions that implement them.
CFAR.SERIALIZED_FIELDS — ConstantSERIALIZED_FIELDS
Description
Constant declaring which fields/columns are serialized.
CFAR.YLGN_9 — ConstantYLGN_9
Description
Yellow-green-9 color scheme.
CFAR.YLGN_9_RAW — ConstantYLGN9RAW
Description
Yellow-green-9 raw RGB values, range [0, 1].
CFAR.AbstractAgent — Typeabstract type AbstractAgentSummary
L2 agent supertype.
Fields
CFAR.Agent — Typestruct Agent{T} <: CFAR.AbstractAgentSummary
L2 AbstractAgent struct.
Fields
agent::Any: The DDVFA module.
params::Dict: Parameters used for l2logging.
scenario::CFAR.ExperienceQueueContainer: Container for theExperienceQueue.
CFAR.Agent — MethodConstructor for a Agent using the scenario dictionary and optional DDVFA keyword argument options.
Arguments
scenario::AbstractDict: l2logger scenario as a dictionary.
CFAR.Agent — MethodCreates 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.
CFAR.ConfigDict — TypeConfigDict
Description
Definition of a configuration dictionary loaded from a config file.
CFAR.DSIC — Typestruct DSIC <: CFAR.VectoredDataSummary
DataSplitIndexedCombined (DSIC)
A struct for encapsulating the components of supervised training in vectorized form.
Fields
train::CFAR.VectorLabeledDataset: TrainingVectorLabeledDataset.
test::CFAR.VectorLabeledDataset: TestVectorLabeledDataset.
CFAR.DSIC — MethodDSIC(data::CFAR.DataSplitCombined) -> CFAR.DSIC
Summary
Create a DSIC object from a DataSplitCombined.
Arguments
data::DataSplitCombined: theDataSplitCombinedto separate into vectors of matrices.
Method List / Definition Locations
DSIC(data)defined at /home/runner/work/CFAR/CFAR/src/lib/data/DSIC.jl:32.
CFAR.DataSplit — Typestruct DataSplit <: CFAR.MatrixDataSummary
A basic struct for encapsulating the components of supervised training.
Fields
train::CFAR.LabeledDataset: TrainingLabeledDataset.
val::CFAR.LabeledDataset: ValidationLabeledDataset.
test::CFAR.LabeledDataset: TestLabeledDataset.
CFAR.DataSplitCombined — Typestruct DataSplitCombined <: CFAR.MatrixDataSummary
A struct for combining training and validation data, containing only train and test splits.
Fields
train::CFAR.LabeledDataset: TrainingLabeledDataset.
test::CFAR.LabeledDataset: TestingLabeledDataset.
CFAR.DataSplitCombined — MethodDataSplitCombined(
data::CFAR.LabeledDataset;
p,
normalize,
scaling
) -> CFAR.DataSplitCombined
Summary
Returns a DataSplitCombined from a LabeledDataset with a provided split ratio p.
Arguments
data::LabeledDataset: the originalLabeledDatasetto split into aDataSplitCombined.p::Float=0.8: kwarg, the split ratio ∈(0, 1).
Method List / Definition Locations
DataSplitCombined(data; p, normalize, scaling)defined at /home/runner/work/CFAR/CFAR/src/lib/data/DataSplitCombined.jl:31.
CFAR.DataSplitIndexed — Typestruct DataSplitIndexed <: CFAR.VectoredDataSummary
A struct for encapsulating the components of supervised training in vectorized form.
Fields
train::CFAR.VectorLabeledDataset: TrainingVectorLabeledDataset.
val::CFAR.VectorLabeledDataset: ValidationVectorLabeledDataset.
test::CFAR.VectorLabeledDataset: TestVectorLabeledDataset.
CFAR.Experience — Typestruct ExperienceSummary
Experience block for an agent.
Taken from l2logger_template.
Fields
task_name::String: The task name.
seq_nums::CFAR.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).
CFAR.Experience — MethodExperience(
task_name::AbstractString,
seq_nums::CFAR.SequenceNums,
block_type::AbstractString
) -> CFAR.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_modelto true, "test" to false.
Method List / Definition Locations
Experience(task_name, seq_nums, block_type)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/experience.jl:76.
CFAR.ExperienceQueue — TypeCFAR.ExperienceQueueContainer — Typestruct ExperienceQueueContainerSummary
Container for the ExperienceQueue and some statistics about it.
Fields
queue::DataStructures.Deque{CFAR.Experience}: TheExperienceQueueitself.
stats::Dict{String, Any}: The statistics about the queue. NOTE These statistics reflect the queue at construction, not after any processing.
CFAR.ExperienceQueueContainer — MethodExperienceQueueContainer(
scenario_dict::AbstractDict
) -> CFAR.ExperienceQueueContainer
Summary
Creates a queue of Experiences from the scenario dictionary.
Arguments
scenario_dict::AbstractDict: the scenario dictionary.
Method List / Definition Locations
ExperienceQueueContainer(scenario_dict)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/scenario.jl:135.
CFAR.ExperienceQueueContainer — MethodExperienceQueueContainer() -> CFAR.ExperienceQueueContainer
Summary
Creates an empty ExperienceQueueContainer with an empty queue and zeroed stats.
Method List / Definition Locations
ExperienceQueueContainer()defined at /home/runner/work/CFAR/CFAR/src/lib/l2/scenario.jl:110.
CFAR.Features — TypeFeatures
Description
Definition of features as a matrix of floating-point numbers of dimension (featuredim, nsamples).
CFAR.Label — TypeLabel
Description
Alias declaring that a supervised label is a string.
CFAR.LabeledDataset — Typestruct LabeledDatasetSummary
A single dataset of Features, Targets, and human-readable string Labels.
Fields
x::Matrix{Float64}: Collection ofFeaturesin the labeled dataset.
CFAR.Labels — TypeLabels
Description
Definition of labels as a vector of strings.
CFAR.MatrixData — Typeabstract type MatrixData <: CFAR.TTDatasetSummary
Abstract type for data structs that represent features as matrices.
Fields
CFAR.MoverSplit — Typestruct MoverSplitSummary
Definition of a split of data with one part remaining static and the other moving.
Fields
static::CFAR.DataSplitCombined: The staticDataSplitCombined.
mover::CFAR.DataSplitCombined: The movingDataSplitCombined.
config::Dict{Any, Any}: The config used to generate the mover.
CFAR.MoverSplit — MethodMoverSplit(
static::CFAR.LabeledDataset,
mover::CFAR.LabeledDataset,
config::Dict{Any, Any}
) -> CFAR.MoverSplit
Summary
Constructor for a MoverSplit taking a preconstructed static and mover LabeledDatasets along with a split parameter p.
Arguments
static::LabeledDataset: the static part of the dataset.mover::LabeledDataset: the moving part of the datset.
Method List / Definition Locations
MoverSplit(static, mover, config)defined at /home/runner/work/CFAR/CFAR/src/lib/data/MoverSplit.jl:36.
CFAR.SCTMoverSplit — Typestruct SCTMoverSplitSummary
Definition of a split of data with one part remaining static and the other moving.
Fields
data::Vector{CFAR.DataSplitCombined}: TODO
config::Dict{Any, Any}: The config used to generate the mover.
CFAR.SCTMoverSplit — MethodSCTMoverSplit(
data::Vector{CFAR.LabeledDataset},
config::Dict{Any, Any}
) -> CFAR.SCTMoverSplit
Summary
Constructor for a SCTMoverSplit taking a preconstructed static and mover LabeledDatasets along with a split parameter p.
Arguments
static::LabeledDataset: the static part of the dataset.mover::LabeledDataset: the moving part of the datset.
Method List / Definition Locations
SCTMoverSplit(data, config)defined at /home/runner/work/CFAR/CFAR/src/lib/data/SCTMoverSplit.jl:31.
CFAR.Sample — TypeSample
Description
Alias declaring a sample as a vector of floating-point values.
CFAR.Samples — TypeSamples
Description
Alias declaring that a sample batch is a vector of samples.
CFAR.SequenceNums — Typestruct SequenceNumsSummary
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.
CFAR.SerializedFeatures — Typestruct SerializedFeaturesSummary
Serializer for Features for saving with Arrow.
Fields
dim1::Vector{Float64}: The first dimension of theFeatures.
dim2::Vector{Float64}: The second dimension of theFeatures.
CFAR.SerializedFeatures — MethodSerializedFeatures(
data::Matrix{Float64}
) -> CFAR.SerializedFeatures
Summary
Constructs a SerializedFeatures from a set of Features.
Arguments
data::Features: theFeaturesto serialize.
Method List / Definition Locations
SerializedFeatures(data)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:471.
CFAR.StatsDict — TypeStatsDict
Description
Alias for a statistics dictionary being string keys mapping to any object.
CFAR.TTDataset — Typeabstract type TTDatasetSummary
Abstract supertype for all train/test dataset structs in this library.
Fields
CFAR.Target — TypeTarget
Description
Alias declaring that a supervised target is an integer.
CFAR.Targets — TypeTargets
Description
Definition of targets as a vector of integers.
CFAR.VectorLabeledDataset — Typestruct VectorLabeledDatasetSummary
A single dataset of vectored labeled data with Features, Targets, and human-readable string Labels.
Fields
x::Vector{Matrix{Float64}}: A vector ofFeaturesmatrices.
CFAR.VectorLabeledDataset — MethodVectorLabeledDataset(
data::CFAR.LabeledDataset
) -> CFAR.VectorLabeledDataset
Summary
Constructor for a VectorLabeledDataset transformed from an existing LabeledDataset.
Arguments
data::LabeledDataset: theLabeledDatasetto turn into a corresponding vectorized version.
Method List / Definition Locations
VectorLabeledDataset(data)defined at /home/runner/work/CFAR/CFAR/src/lib/data/VectorLabeledDataset.jl:38.
CFAR.VectoredData — Typeabstract type VectoredData <: CFAR.TTDatasetSummary
Abstract type for data structs that represent features as vectors of matrices.
Fields
Base.show — Methodshow(io::IO, agent::CFAR.Agent)
Summary
Overload of the show function for Agent.
Arguments
io::IO: the current IO stream.cont::AbstractAgent: theAgentto print/display.
Method List / Definition Locations
show(io, agent)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/agents.jl:101.
Base.show — Methodshow(io::IO, cont::CFAR.ExperienceQueueContainer)
Summary
Overload of the show function for ExperienceQueueContainer.
Arguments
io::IO: the current IO stream.cont::ExperienceQueueContainer: theExperienceQueueContainerto print/display.
Method List / Definition Locations
show(io, cont)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/scenario.jl:175.
Base.show — Methodshow(io::IO, queue::DataStructures.Deque{CFAR.Experience})
Summary
Overload of the show function for ExperienceQueue.
Arguments
io::IO: the current IO stream.cont::ExperienceQueueContainer: theExperienceQueueContainerto print/display.
Method List / Definition Locations
show(io, queue)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/scenario.jl:157.
CFAR._save_plot — Method_save_plot(p::Plots.Plot, filename::AbstractString) -> Any
Summary
Wrapper for how figures are saved in the CFAR project.
Arguments
p::Plots.Plot: the Plot object to save.filename::AbstractString: the full file path as a string.
Method List / Definition Locations
_save_plot(p, filename)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:866.
CFAR._save_table — Method_save_table(table, filename::AbstractString) -> Any
Summary
Wrapper for how tables are saved in the CFAR project.
Arguments
table: the table object to save.filename::AbstractString: the full file path as a string.
Method List / Definition Locations
_save_table(table, filename)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:877.
CFAR.conda_gc_disable — Methodconda_gc_disable()
Summary
Wrapper for disabling the PythonCall garbage collector.
Method List / Definition Locations
conda_gc_disable()defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:98.
CFAR.conda_gc_enable — Methodconda_gc_enable()
Summary
Wrapper for reenabling the PythonCall garbage collector.
Method List / Definition Locations
conda_gc_enable()defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:109.
CFAR.conda_run — Methodconda_run(cmd_string::AbstractString) -> Any
Summary
Runs a provided command with the correct CondaPkg.jl Python environment.
Arguments
cmd_string::AbstractString: the Python command to run as a string, excluding the initial 'python' part.
Method List / Definition Locations
conda_run(cmd_string)defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:43.
CFAR.conda_setup — Methodconda_setup()
Summary
Sets up the Conda dependencies, including local libraries.
Method List / Definition Locations
conda_setup()defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:81.
CFAR.config_dir — Methodconfig_dir(args...) -> String
Summary
Points to the configs directory.
Arguments
args...: the string directories to append to the directory.
Method List / Definition Locations
config_dir(args)defined at /home/runner/work/CFAR/CFAR/src/lib/utils/drwatson.jl:56.
CFAR.config_to_params — Methodconfig_to_params(
opts::Dict{Any, Any},
pargs::Dict{String, Any}
) -> Tuple{Dict{Any, Any}, Dict{String, Any}}
Summary
Parses the config dictionary to a parameters dictionary for use in a distributed simulation.
Method List / Definition Locations
config_to_params(opts, pargs)defined at /home/runner/work/CFAR/CFAR/src/lib/drivers.jl:36.
CFAR.cvi_exp — Methodcvi_exp(opts::AbstractDict)
Summary
Runs a single CVI experiment, for use in a distributed simulation.
Method List / Definition Locations
cvi_exp(opts)defined at /home/runner/work/CFAR/CFAR/src/lib/drivers.jl:126.
CFAR.data_dir — Methoddata_dir(args...) -> String
Summary
Points to the data directory.
Arguments
args...: the string directories to append to the directory.
Method List / Definition Locations
data_dir(args)defined at /home/runner/work/CFAR/CFAR/src/lib/utils/drwatson.jl:44.
CFAR.deserialize_df! — Methoddeserialize_df!(df::DataFrames.DataFrame)
Summary
Deserializes the serialized fields of a DataFrame according to SERIALIZED_FIELDS.
Arguments
df::DataFrames.DataFrame: the dataframe containing serialized fields.
Method List / Definition Locations
deserialize_df!(df)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:571.
CFAR.deserialize_features — Methoddeserialize_features(
el::CFAR.SerializedFeatures
) -> Matrix{Float64}
Summary
Deserializes a set of SerializedFeatures and constructs a set of Features.
Arguments
el::SerializedFeatures: theSerializedFeaturesto deserialize.
Method List / Definition Locations
deserialize_features(el)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:545.
CFAR.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/CFAR/CFAR/src/lib/utils/args.jl:74.
CFAR.evaluate_agent! — Methodevaluate_agent!(
agent::CFAR.Agent,
experience::CFAR.Experience,
data::CFAR.VectoredData
) -> Dict
Summary
Evaluates a single agent on a single experience, training or testing as needed.
Arguments
agent::Agent: theAgentto evaluate.exp::Experience: theExperienceto use for training/testing.
Method List / Definition Locations
evaluate_agent!(agent, experience, data)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/agents.jl:152.
CFAR.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/CFAR/CFAR/src/lib/utils/args.jl:35.
CFAR.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/CFAR/CFAR/src/lib/data/load.jl:54.
CFAR.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: theStatsDictdictionary 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/CFAR/CFAR/src/lib/l2/scenario.jl:205.
CFAR.gen_gaussians — Methodgen_gaussians(
config_file::AbstractString
) -> CFAR.MoverSplit
Summary
Generate the Gaussian dataset from the parameters specified in the provided file.
Arguments
config_file::AbstractString: the config file name as a string.
Method List / Definition Locations
gen_gaussians(config_file)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:171.
CFAR.gen_gaussians — Methodgen_gaussians(config::Dict{Any, Any}) -> CFAR.MoverSplit
Summary
Generates Gaussian distributed samples from the provided configuration dictionary.
Arguments
config::ConfigDict: the config parameters as a dictionary.
Method List / Definition Locations
gen_gaussians(config)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:113.
CFAR.gen_scenario — Methodgen_scenario(
exp_top::AbstractString,
data_indexed::CFAR.DSIC
)
Summary
Generates a configuration and scenario from a dataset.
Arguments
exp_top::AbstractString:
Method List / Definition Locations
gen_scenario(exp_top, data_indexed)defined at /home/runner/work/CFAR/CFAR/src/lib/data.jl:149.
CFAR.gen_scenarios — Methodgen_scenarios(data::Dict{String, CFAR.DSIC})
Summary
Generates all L2 scenarios as inferred from an existing named set of DSIC datasets.
Arguments
data::Dict{String, DSIC}: the named set ofDSICdatasets to use for generating scenario files.
Method List / Definition Locations
gen_scenarios(data)defined at /home/runner/work/CFAR/CFAR/src/lib/data.jl:267.
CFAR.gen_sct_gaussians — Methodgen_sct_gaussians(
config_file::AbstractString
) -> CFAR.SCTMoverSplit
Summary
Generate the Single-Class-Task Gaussian dataset from the parameters specified in the provided file.
Arguments
config_file::AbstractString: the config file name as a string.
Method List / Definition Locations
gen_sct_gaussians(config_file)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:237.
CFAR.gen_sct_gaussians — Methodgen_sct_gaussians(
config::Dict{Any, Any}
) -> CFAR.SCTMoverSplit
Summary
Generates Single-Class-Task Gaussian distributed samples from the provided configuration dictionary.
Arguments
config::ConfigDict: the config parameters as a dictionary.
Method List / Definition Locations
gen_sct_gaussians(config)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:185.
CFAR.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/CFAR/CFAR/src/lib/utils/args.jl:19.
CFAR.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/CFAR/CFAR/src/lib/data/load.jl:42.
CFAR.get_dists — Methodget_dists(
config::Dict{Any, Any}
) -> Vector{Distributions.MvNormal}
Summary
Gets the distribution generators based upon the config parameters.
Arguments
config::ConfigDict: the config parameters as a dictionary.
Method List / Definition Locations
get_dists(config)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:76.
CFAR.get_gaussian_config — Methodget_gaussian_config(config_file::AbstractString) -> Any
Summary
Loads the Gaussian distribution parameters from the provided config file.
Arguments
config_file::AbstractString: the config file name as a string.
Method List / Definition Locations
get_gaussian_config(config_file)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:37.
CFAR.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/CFAR/CFAR/src/lib/l2/agents.jl:134.
CFAR.get_manual_split — Methodget_manual_split(
data::AbstractMatrix{T} where T<:Real,
targets::AbstractVector{T} where T<:Integer;
p
) -> Tuple{Tuple{Any, Any}, Tuple{Any, Any}}
Summary
Teturns 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.p::Float=0.8: kwarg, the split ratio ∈(0, 1).
Method List / Definition Locations
get_manual_split(data, targets; p)defined at /home/runner/work/CFAR/CFAR/src/lib/data/LabeledDataset.jl:67.
CFAR.get_mlp — Methodget_mlp() -> PythonCall.Core.Py
Summary
Loads and returns a handle to the local mlp Python library.
Method List / Definition Locations
get_mlp()defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:32.
CFAR.get_mover_data — Methodget_mover_data(
opts::AbstractDict;
config_file
) -> Union{CFAR.MoverSplit, CFAR.SCTMoverSplit}
Summary
Load the mover dataset.
Method List / Definition Locations
get_mover_data(opts; config_file)defined at /home/runner/work/CFAR/CFAR/src/lib/drivers.jl:101.
CFAR.get_mover_direction — Methodget_mover_direction(config::Dict{Any, Any}) -> Any
Summary
Generates a vector representing the direction of the mover's line.
Arguments
config::ConfigDict: the config parameters as a dictionary.
Method List / Definition Locations
get_mover_direction(config)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:254.
CFAR.get_mover_line — Methodget_mover_line(
config::Dict{Any, Any};
n_points,
length
) -> Any
Summary
Generates a dataset of points representing the mover's direction of traversal.
Arguments
config::ConfigDict: the config parameters as a dictionary.n_points::Integer=2: kwarg, number of points along the line to return.length::Float=10.0: kwarg, length of the line.
Method List / Definition Locations
get_mover_line(config; n_points, length)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:79.
CFAR.get_n_procs — Methodget_n_procs() -> Int64
Summary
Returns the default number of processes to start in distributed experiments on different platforms.
Method List / Definition Locations
get_n_procs()defined at /home/runner/work/CFAR/CFAR/src/lib/utils/args.jl:59.
CFAR.get_pylib — Methodget_pylib(lib::AbstractString) -> PythonCall.Core.Py
Summary
Loads and returns a handle to the provided local Python library.
Arguments
lib::AbstractString: the string name of the local Python library to load.
Method List / Definition Locations
get_pylib(lib)defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:17.
CFAR.get_shift — Methodget_shift(config::Dict{Any, Any}, s::Float64) -> Any
Summary
Gets the shift vector from the configuration and distance to traverse.
Arguments
config::ConfigDict: the config parameters as a dictionary.s::Float: the distance to travel along the line
Method List / Definition Locations
get_shift(config, s)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:272.
CFAR.get_table_row — Methodget_table_row(
data::CFAR.DataSplitCombined,
label::AbstractString
) -> Vector{Any}
Summary
Constructs a DataFrame table row for saving to an Arrow table.
Arguments
data::DataSplitCombined: the data split.label::AbstractString: the string label for the data split.
Method List / Definition Locations
get_table_row(data, label)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:489.
CFAR.get_windows — Methodget_windows(
vs::AbstractVector{T} where T<:Real,
n::Integer
) -> Any
Summary
Constructs a windowed matrix of a vector.
Arguments
vs::RealVector: the original vector.n::Integer: the size of the sliding window.
Method List / Definition Locations
get_windows(vs, n)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:443.
CFAR.get_x — Methodget_x(data::CFAR.DataSplitCombined) -> Matrix{Float64}
Summary
Returns the concatenated training and testing features data from a DataSplitCombined.
Arguments
data::DataSplitCombined: theDataSplitCombinedto get the combined train/test features from.
Method List / Definition Locations
get_x(data)defined at /home/runner/work/CFAR/CFAR/src/lib/data/DataSplitCombined.jl:78.
CFAR.get_y — Methodget_y(data::CFAR.DataSplitCombined) -> Vector{Int64}
Summary
Returns the concatenated training and testing targets data from a DataSplitCombined.
Arguments
data::DataSplitCombined: theDataSplitCombinedto get the combined train/test targets from.
Method List / Definition Locations
get_y(data)defined at /home/runner/work/CFAR/CFAR/src/lib/data/DataSplitCombined.jl:91.
CFAR.initialize_exp_queue! — Methodinitialize_exp_queue!(
eqc::CFAR.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/CFAR/CFAR/src/lib/l2/scenario.jl:56.
CFAR.is_complete — Methodis_complete(agent::CFAR.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/CFAR/CFAR/src/lib/l2/agents.jl:121.
CFAR.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/CFAR/CFAR/src/lib/l2/common.jl:96.
CFAR.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/CFAR/CFAR/src/lib/l2/common.jl:83.
CFAR.load_all — Methodload_all(
filename::AbstractString
) -> Tuple{DataFrames.DataFrame, Arrow.Table}
Summary
Loads the Arrow file as a DataFrame.
Arguments
filename::AbstractString: location of the Arrow file.
Method List / Definition Locations
load_all(filename)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:585.
CFAR.load_art_sim_opts — Functionload_art_sim_opts() -> Any
load_art_sim_opts(file::AbstractString) -> Any
Summary
Loads the ART simulation options in the provided file with a default.
Arguments
file::AbstractString: the YAML file to load, defaultart.yml.
Method List / Definition Locations
load_art_sim_opts()
load_art_sim_opts(file)defined at /home/runner/work/CFAR/CFAR/src/lib/experiments.jl:17.
CFAR.load_config — Methodload_config(config_file::AbstractString) -> Any
Summary
Wrapper for loading the configuration file with the provided filename.
Arguments
config_file::AbstractString: the config file name as a string.
Method List / Definition Locations
load_config(config_file)defined at /home/runner/work/CFAR/CFAR/src/lib/utils/file.jl:28.
CFAR.load_dataset — Methodload_dataset(filename::AbstractString) -> Tuple{Any, Any}
Summary
Loads a local dataset.
Arguments
filename::AbstractString: the location of the file to load with a default value.
Method List / Definition Locations
load_dataset(filename)defined at /home/runner/work/CFAR/CFAR/src/lib/data/load.jl:8.
CFAR.load_datasets — Functionload_datasets() -> Dict{String, CFAR.LabeledDataset}
load_datasets(
topdir::AbstractString
) -> Dict{String, CFAR.LabeledDataset}
Summary
Loads all of the data sets from the local data package folder.
Arguments
topdir::AbstractString = data_dir("data-package"):
Method List / Definition Locations
load_datasets()
load_datasets(topdir)defined at /home/runner/work/CFAR/CFAR/src/lib/data/load.jl:71.
CFAR.load_mlp_sim_opts — Functionload_mlp_sim_opts() -> Any
load_mlp_sim_opts(file::AbstractString) -> Any
Summary
Loads the MLP simulation options in the provided file with a default.
Arguments
file::AbstractString: the YAML file to load, defaultmlp.yml.
Method List / Definition Locations
load_mlp_sim_opts()
load_mlp_sim_opts(file)defined at /home/runner/work/CFAR/CFAR/src/lib/experiments.jl:42.
CFAR.load_moversplit — Methodload_moversplit(filename::AbstractString) -> Any
Summary
Loads and returns the gaussian data from the provided filename.
Arguments
filename::AbstractString: the full file path as a string.
Method List / Definition Locations
load_moversplit(filename)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:445.
CFAR.load_opts — Methodload_opts(
config_file::Union{Nothing, AbstractString},
pargs::Dict{String, Any}
) -> Any
Summary
Loads the options for the experiment, using the pargs config file if nothing` is provided.
Arguments
config_file::OptionString: The configuration file to load.pargs::Dict{String, Any}: The parsed arguments from the terminal.
Method List / Definition Locations
load_opts(config_file, pargs)defined at /home/runner/work/CFAR/CFAR/src/lib/drivers.jl:82.
CFAR.load_vec_datasets — Functionload_vec_datasets() -> Dict{String, CFAR.DSIC}
load_vec_datasets(p::Float64) -> Dict{String, CFAR.DSIC}
load_vec_datasets(
p::Float64,
seed::Real
) -> Dict{String, CFAR.DSIC}
Summary
Method List / Definition Locations
load_vec_datasets()
load_vec_datasets(p)
load_vec_datasets(p, seed)defined at /home/runner/work/CFAR/CFAR/src/lib/data.jl:119.
CFAR.log_data — Methodlog_data(
data_logger::PythonCall.Core.Py,
experience::CFAR.Experience,
results::Dict,
params::Dict;
status
) -> PythonCall.Core.Py
Summary
Logs data from an L2 Experience.
Arguments
data_logger::PythonCall.Py: the l2logger DataLogger.exp::Experience: theExperiencethat theAbstractAgentjust processed.results::Dict: the results from theAbstractAgent'sExperience.status::AbstractString: string expressing if theExperiencewas processed.
Method List / Definition Locations
log_data(data_logger, experience, results, params; status)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/agents.jl:190.
CFAR.paper_results_dir — Methodpaper_results_dir(args...) -> String
Summary
DrWatson-style paper results directory.
Arguments
args...: the string directories to append to the directory.
Method List / Definition Locations
paper_results_dir(args)defined at /home/runner/work/CFAR/CFAR/src/lib/utils/drwatson.jl:68.
CFAR.plot_2d_attrs — Methodplot_2d_attrs(
df::DataFrames.DataFrame,
attrs::Array{T<:AbstractString, 1};
avg,
n,
title,
labels,
kwargs...
) -> Plots.Plot
Summary
Plots the 2D performances trends.
Arguments
df::DataFrame: the collected simulation results.attrs::Vector{T} where T <: AbstractString: the columns in the dataframe as a list of strings to create plotlines for.avg::Bool=false: optional, default false, flag to compute the windowed averages of the trends.n::Integer=10: optional, default 10, the size of the average sliding window if that option is used.
Method List / Definition Locations
plot_2d_attrs(df, attrs; avg, n, title, labels, kwargs...)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:377.
CFAR.plot_2d_errlines — Methodplot_2d_errlines(
df::DataFrames.DataFrame,
attrs::Array{T<:AbstractString, 1};
n,
title,
labels,
kwargs...
) -> Plots.Plot
Summary
Plots the 2D performances trends.
Arguments
df::DataFrame: the collected simulation results.attrs::Vector{T} where T <: AbstractString: the columns in the dataframe as a list of strings to create plotlines for.
Method List / Definition Locations
plot_2d_errlines(df, attrs; n, title, labels, kwargs...)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:530.
CFAR.plot_2d_errlines_double — Methodplot_2d_errlines_double(
df::DataFrames.DataFrame,
df2::DataFrames.DataFrame,
attrs::Array{T<:AbstractString, 1},
attrs2::Array{T<:AbstractString, 1};
n,
title,
labels,
labels2,
kwargs...
) -> Plots.Plot
Summary
Plots the 2D performances trends.
Arguments
df::DataFrame: the collected simulation results.attrs::Vector{T} where T <: AbstractString: the columns in the dataframe as a list of strings to create plotlines for.
Method List / Definition Locations
plot_2d_errlines_double(
df,
df2,
attrs,
attrs2;
n,
title,
labels,
labels2,
kwargs...
)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:589.
CFAR.plot_2d_errlines_overlay — Methodplot_2d_errlines_overlay(
df::DataFrames.DataFrame,
df2::DataFrames.DataFrame,
attrs::Array{T<:AbstractString, 1},
attrs2::Array{T<:AbstractString, 1};
n,
title,
labels,
labels2,
kwargs...
) -> Plots.Plot
Summary
Plots the 2D performances trends.
Arguments
df::DataFrame: the collected simulation results.attrs::Vector{T} where T <: AbstractString: the columns in the dataframe as a list of strings to create plotlines for.
Method List / Definition Locations
plot_2d_errlines_overlay(
df,
df2,
attrs,
attrs2;
n,
title,
labels,
labels2,
kwargs...
)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:730.
CFAR.plot_covellipses — Methodplot_covellipses(p::Plots.Plot, config::Dict{Any, Any})
Summary
Plots the covariance ellipses from the config on top of an existing plot.
Arguments
p::Plots.Plot: an existingPlots.Plotobject.config::ConfigDict: the config parameters as a dictionary.
Method List / Definition Locations
plot_covellipses(p, config)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:47.
CFAR.plot_mover — Methodplot_mover(ms::CFAR.MoverSplit) -> Plots.Plot
Summary
Plots the mover line plot with scattered data points, covariance lines, and mover line.
Arguments
ms::MoverSplit: theMoverSplitdataset.
Method List / Definition Locations
plot_mover(ms)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:106.
CFAR.plot_mover — Methodplot_mover(
ms::CFAR.SCTMoverSplit;
length,
kwargs...
) -> Plots.Plot
Summary
Plots the mover line plot with scattered data points, covariance lines, and mover line.
Arguments
ms::MoverSplit: theMoverSplitdataset.
Method List / Definition Locations
plot_mover(ms; length, kwargs...)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:151.
CFAR.results_dir — Methodresults_dir(args...) -> String
Summary
Points to the results directory.
Arguments
args...: the string directories to append to the directory.
Method List / Definition Locations
results_dir(args)defined at /home/runner/work/CFAR/CFAR/src/lib/utils/drwatson.jl:32.
CFAR.run_exp — Methodrun_exp(; config_file)
Summary
Runs a distributed experiment.
Arguments
config_file::OptionString: The configuration file to load.
Method List / Definition Locations
run_exp(; config_file)defined at /home/runner/work/CFAR/CFAR/src/lib/drivers.jl:636.
CFAR.run_scenario — Methodrun_scenario(
agent::CFAR.Agent,
data::CFAR.VectoredData,
data_logger::PythonCall.Core.Py
)
Summary
Runs an agent's scenario.
Arguments
agent::Agent: a struct that contains anAgentandscenario.data_logger::PythonCall.Py: a l2logger object.
Method List / Definition Locations
run_scenario(agent, data, data_logger)defined at /home/runner/work/CFAR/CFAR/src/lib/l2/agents.jl:214.
CFAR.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/CFAR/CFAR/src/lib/l2/common.jl:60.
CFAR.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/CFAR/CFAR/src/lib/l2/common.jl:45.
CFAR.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/CFAR/CFAR/src/lib/l2/common.jl:71.
CFAR.save_all — Methodsave_all(
ms::CFAR.MoverSplit,
filename::AbstractString
) -> DataFrames.DataFrame
Summary
Saves the MoverSplit as an Arrow file for transferability.
Arguments
ms::MoverSplit:
Method List / Definition Locations
save_all(ms, filename)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:506.
CFAR.save_plot — Methodsave_plot(
p::Plots.Plot,
fig_name::AbstractString,
exp_top::AbstractString,
exp_name::AbstractString
)
Summary
Saves the plot to the both the local results directory and to the paper directory.
Arguments
p::Plots.Plot: the handle of the plot to save.fig_name::AbstractString: the name of the figure file itself.exp_top::AbstractString: the top of the experiment directory.exp_name::AbstractString: the name of the experiment itself.
Method List / Definition Locations
save_plot(p, fig_name, exp_top, exp_name)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:900.
CFAR.save_sim — Methodsave_sim(
dir_func::Function,
d::AbstractDict,
fulld::AbstractDict
)
Summary
Common save function for simulations.
Arguments
dir_func::Function: the function that provides the correct file path with provided strings.d::AbstractDict: the simulation options dictionary.fulld::AbstractDict: the dictionary containing the sim results.
Method List / Definition Locations
save_sim(dir_func, d, fulld)defined at /home/runner/work/CFAR/CFAR/src/lib/experiments.jl:64.
CFAR.scatter_gaussian! — Methodscatter_gaussian!(
p::Plots.Plot,
data::CFAR.DataSplitCombined
)
Summary
Combines and plots data from a gaussian distribution.
Arguments
p::Plots.Plot: the plot handle to add the gaussians to.data::DataSplitCombined: the data to plot.
Method List / Definition Locations
scatter_gaussian!(p, data)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:18.
CFAR.setup_local_pylib — Methodsetup_local_pylib(lib::AbstractString)
Summary
Sets up a local Python library with .
Arguments
lib::AbstractString: the string name of the local library to setup.
Method List / Definition Locations
setup_local_pylib(lib)defined at /home/runner/work/CFAR/CFAR/src/lib/py.jl:61.
CFAR.shift_mover — Methodshift_mover(
ms::CFAR.MoverSplit,
s::Float64
) -> CFAR.MoverSplit
Summary
Moves the mover component of a MoverSplit a distance of s.
Arguments
ms::MoverSplit: the datset containing a mover to shift.config::ConfigDict: the config parameters as a dictionary.s::Float: the distance to travel along the line
Method List / Definition Locations
shift_mover(ms, s)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:307.
CFAR.shift_mover — Methodshift_mover(
ms::CFAR.SCTMoverSplit,
s::Float64
) -> CFAR.SCTMoverSplit
Summary
Moves the mover component of a SCTMoverSplit a distance of s.
Arguments
ms::SCTMoverSplit: the datset containing a mover to shift.config::ConfigDict: the config parameters as a dictionary.s::Float: the distance to travel along the line
Method List / Definition Locations
shift_mover(ms, s)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:359.
CFAR.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/CFAR/CFAR/src/lib/data/load.jl:32.
CFAR.sliding_avg — Methodsliding_avg(
vs::AbstractVector{T} where T<:Real,
n::Integer
) -> Any
Summary
Computes the averages of a sliding window along a vector.
Arguments
vs::RealVector: the vector to compute windowed averages of.n::Integer: the size of the sliding window.
Method List / Definition Locations
sliding_avg(vs, n)defined at /home/runner/work/CFAR/CFAR/src/lib/plot.jl:358.
CFAR.split_data — Methodsplit_data(
data::CFAR.LabeledDataset;
p
) -> Tuple{CFAR.LabeledDataset, CFAR.LabeledDataset}
Summary
Splits a LabeledDataset into two LabeledDatasets
Arguments
data::LabeledDataset: the original dataset to split.p::Float=0.8: kwarg, the split ratio ∈(0, 1).
Method List / Definition Locations
split_data(data; p)defined at /home/runner/work/CFAR/CFAR/src/lib/data/LabeledDataset.jl:81.
CFAR.split_datasets — Methodsplit_datasets(
datasets::Dict{String, CFAR.LabeledDataset};
p
) -> Dict{String, CFAR.DataSplitCombined}
Summary
Splits the provided LabeledDatasets into train/test splits with a provided ratio p.
Argument
datasets::Dict{String, LabeledDataset}: a named mapping to a set ofLabeledDatasets.p::Float=0.8: kwarg, the split ratio ∈(0, 1).
Method List / Definition Locations
split_datasets(datasets; p)defined at /home/runner/work/CFAR/CFAR/src/lib/data.jl:71.
CFAR.train_test_mlp_mc — Methodtrain_test_mlp_mc(
d::AbstractDict,
ms::CFAR.MoverSplit,
dir_func::Function,
opts::AbstractDict
)
Summary
Train and test an MLP on the MoverSplit dataset.
Arguments
d::AbstractDict: the simulation options dictionary.ms::MoverSplit: theMoverSplitdataset to train and test on.dir_func::Function: the function that provides the correct file path with provided strings.opts::AbstractDict: additional options for the simulation.
Method List / Definition Locations
train_test_mlp_mc(d, ms, dir_func, opts)defined at /home/runner/work/CFAR/CFAR/src/lib/experiments.jl:202.
CFAR.train_test_sfam_mc — Methodtrain_test_sfam_mc(
d::AbstractDict,
ms::CFAR.MoverSplit,
dir_func::Function,
opts::AbstractDict
)
Summary
Train and test SFAM on the MoverSplit dataset in parallel.
Arguments
d::AbstractDict: the simulation options dictionary.ms::MoverSplit: theMoverSplitdataset to train and test on.dir_func::Function: the function that provides the correct file path with provided strings.opts::AbstractDict: additional options for the simulation.
Method List / Definition Locations
train_test_sfam_mc(d, ms, dir_func, opts)defined at /home/runner/work/CFAR/CFAR/src/lib/experiments.jl:91.
CFAR.vec_vec_to_matrix — Methodvec_vec_to_matrix(vec_vec::AbstractVector) -> Any
Summary
Turns a vector of vectors into a matrix.
Assumes that the shape of the vector of vectors is square.
Arguments
vec_vec::AbstractVector: a vector of vectors of numerical values.
Method List / Definition Locations
vec_vec_to_matrix(vec_vec)defined at /home/runner/work/CFAR/CFAR/src/lib/gaussians.jl:19.
CFAR.vectorize_datasets — Methodvectorize_datasets(
datasets::Dict{String, CFAR.DataSplitCombined}
) -> Dict{String, CFAR.DSIC}
Summary
Turns a named set of DataSplitCombineds into vectorized DSIC datasets.
Arguments
datasets::Dict{String, DataSplitCombined}: the named set ofDataSplitCombineds to turn into corresponding vectorizedDSIC.
Method List / Definition Locations
vectorize_datasets(datasets)defined at /home/runner/work/CFAR/CFAR/src/lib/data.jl:105.
CFAR.work_dir — Methodwork_dir(args...) -> String
Summary
Points to the work directory containing raw datasets, processed datasets, and results.
Arguments
args...: the string directories to append to the directory.
Method List / Definition Locations
work_dir(args)defined at /home/runner/work/CFAR/CFAR/src/lib/utils/drwatson.jl:20.