Developer Index
This page lists the types and functions that are internal to the OAR
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.
"Table" of Contents
Modules | Functions | Types | Constants |
---|---|---|---|
Index | Index | Index | Index |
Docs | Docs | Docs | Docs |
Index
This section contains a list of internal names that link to their corresponding Documentation.
Modules
Functions
OAR.CFG_from_df
OAR.CMTCFG
OAR.DescretizedCFG
OAR.DescretizedCFG
OAR.NonTerminal
OAR.SPOCFG
OAR.Terminal
OAR._save_plot
OAR._save_table
OAR._show_datasplit
OAR.accommodate_vector!
OAR.activation
OAR.activation
OAR.activation_match!
OAR.add_node!
OAR.add_subtree_terminals
OAR.average
OAR.check_if_piped
OAR.cluster_rand
OAR.cluster_rand_data
OAR.cluster_serial
OAR.cluster_stats_plot
OAR.complete
OAR.config_dir
OAR.create_category!
OAR.create_category!
OAR.data_dir
OAR.df_to_dicts
OAR.df_to_statements
OAR.df_to_trees
OAR.dist_exp_parse
OAR.exp_parse
OAR.full_save_sim
OAR.gen_STARTStats
OAR.get_argparsesettings
OAR.get_cmt_parser
OAR.get_data_package_names
OAR.get_gramart_instance_counts
OAR.get_iris_parser
OAR.get_kg_parser
OAR.get_kg_statements
OAR.get_mldata
OAR.get_piped_parser
OAR.get_positive_dist
OAR.get_production_rules
OAR.get_terminals
OAR.get_tree_production_rules
OAR.get_tree_terminals
OAR.get_windows
OAR.inc_update_symbols!
OAR.integer_encoding
OAR.is_nonterminal
OAR.is_terminal
OAR.is_terminal
OAR.is_terminal
OAR.join_gsymbol
OAR.learn!
OAR.learn!
OAR.load_cmt
OAR.load_cmt_dict
OAR.load_config
OAR.load_data_package
OAR.load_dataframe
OAR.match
OAR.match
OAR.median
OAR.paper_results_dir
OAR.parse_grammar
OAR.print_treenode_children
OAR.protein_df_to_strings
OAR.quick_statement
OAR.random_produce
OAR.random_statement
OAR.real_to_symb
OAR.results_dir
OAR.run_parser
OAR.save_dataframe
OAR.save_plot
OAR.save_sim
OAR.shuffle_dataset
OAR.shuffle_pairs
OAR.sim_tt_serial
OAR.similarity
OAR.single
OAR.sliding_avg
OAR.symbolic_cluster_dataset
OAR.symbolic_dataset
OAR.symbolic_iris
OAR.symbolic_lung_cancer
OAR.symbolic_mushroom
OAR.symbolic_wine
OAR.tc_start
OAR.tt_gramart
OAR.tt_real
OAR.tt_serial
OAR.update_dist!
OAR.vector_to_tree
OAR.weighted
OAR.work_dir
Types
OAR.ARTNode
OAR.AbstractSTART
OAR.CFG
OAR.CFG
OAR.CFG
OAR.CMTPipedTree
OAR.CMTSTARTTree
OAR.CMTSymbol
OAR.ConfigDict
OAR.DataSplit
OAR.DataSplit
OAR.DataSplitGeneric
OAR.DataSplitGeneric
OAR.DistributedSTART
OAR.Grammar
OAR.IRISSTARTTree
OAR.IRISSymbol
OAR.KGSTARTTree
OAR.KGStatement
OAR.KGSymbol
OAR.ProductionRule
OAR.ProductionRuleSet
OAR.ProtoChildren
OAR.ProtoNodeStats
OAR.ProtoNodeStats
OAR.STARTStatement
OAR.STARTStatements
OAR.STARTStats
OAR.STARTSymbol
OAR.SingleSTART
OAR.SomeStatement
OAR.SomeStatements
OAR.Statement
OAR.Statements
OAR.SymbolCount
OAR.SymbolSet
OAR.TTDataset
OAR.TerminalDist
OAR.TreeStatement
OAR.TreeStatements
OAR.VectoredDataSplit
OAR.VectoredDataSplit
OAR.VectoredDataset
OAR.opts_DDVSTART
OAR.opts_DVSTART
OAR.opts_START
Constants
OAR.ARG_ARGPARSE_DESCRIPTION
OAR.ARG_CFG
OAR.ARG_CONFIG_FILE
OAR.ARG_FILENAME
OAR.ARG_SIM_D
OAR.ARG_SIM_DIR_FUNC
OAR.ARG_SIM_OPTS
OAR.ARG_SIM_TS
OAR.CMT_CLUSTERING_COLUMNS
OAR.CMT_PHENOTYPES
OAR.COLORSCHEME
OAR.COMMON_DOC
OAR.DEFAULT_N_PROCS_UNIX
OAR.DEFAULT_N_PROCS_WINDOWS
OAR.DEFAULT_P
OAR.DPI
OAR.DRWATSON_ARGS_DOC
OAR.FONTFAMILY
OAR.GRAMMAR_ARG
OAR.GRAMMAR_SYMB_ARG
OAR.GSYMBOL_DATA_ARG
OAR.LINEWIDTH
OAR.LINKAGE_METHODS
OAR.SAVE_MAP
OAR.alphabet
OAR.letter_vec
Docs
Documentation for all internal names are listed below.
Modules
Functions
Base.show
— Methodshow(io::IO, parser::Lerche.Lark) -> Any
Summary
Overload of the show function for Lerche.Lark parsers to reduce terminal output noise.
Arguments
io::IO
: the current IO stream.parser::Lerche.Lark
: the Lerche.Lark parser to print/display.
Method List / Definition Locations
show(io, parser)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/common.jl:23
.
Base.show
— Methodshow(io::IO, cfg::OAR.CFG)
Summary
Overload of the show function for OAR.CFG
.
Arguments
io::IO
: the current IO stream.cfg::CFG
: theOAR.CFG
OAR.Grammar
to print/display.
Method List / Definition Locations
show(io, cfg)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:207
.
Base.show
— Methodshow(io::IO, data::OAR.DataSplit)
Summary
Overload of the show function for OAR.DataSplit
.
Arguments
io::IO
: the current IO stream.data::DataSplit
: theOAR.DataSplit
to print/display.
Method List / Definition Locations
show(io, data)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:133
.
Base.show
— Methodshow(io::IO, data::OAR.VectoredDataSplit)
Summary
Overload of the show function for OAR.VectoredDataSplit
.
Arguments
io::IO
: the current IO stream.data::VectoredDataSplit
: theOAR.VectoredDataSplit
to print/display.
Method List / Definition Locations
show(io, data)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:151
.
Base.show
— Methodshow(io::IO, node::ProtoNode)
Summary
Overload of the show function for OAR.ProtoNode
.
Arguments
io::IO
: the current IO stream.node::ProtoNode
: theOAR.ProtoNode
to print/display.
Method List / Definition Locations
show(io, node)
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:249
.
Base.show
— Methodshow(io::IO, node::TreeNode)
Summary
Overload of the show function for OAR.TreeNode
.
Arguments
io::IO
: the current IO stream.node::TreeNode
: theOAR.TreeNode
to print/display.
Method List / Definition Locations
show(io, node)
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:293
.
OAR.CFG_from_df
— FunctionCFG_from_df(
df::DataFrames.DataFrame
) -> Tuple{OAR.CFG{String}, Vector{Vector{GSymbol{String}}}, Any}
CFG_from_df(
df::DataFrames.DataFrame,
label::Symbol
) -> Tuple{OAR.CFG{String}, Vector{Vector{GSymbol{String}}}, Any}
CFG_from_df(
df::DataFrames.DataFrame,
label::Symbol,
ignores::Vector{Symbol};
stringify
) -> Tuple{OAR.CFG{String}, Vector{Vector{GSymbol{String}}}, Any}
Summary
Constructs a context-free grammar from a dataframe.
Arguments
df::DataFrame
: the dataframe to turn into aOAR.CFG
grammar, statements, and their labels.label::Symbol=:class
: the symbolic name of the column of the DataFrame belonging to the target labels.
Method List / Definition Locations
CFG_from_df(df)
CFG_from_df(df, label)
CFG_from_df(df, label, ignores; stringify)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:507
.
OAR.CMTCFG
— MethodCMTCFG(statements::Vector{TreeNode}) -> OAR.CFG{String}
Summary
Turns a vector of statements in the form of OAR.TreeNode
s into a CMT disease CFG grammar.
Arguments
statements::TreeStatements
: the statements to infer the grammar from.
Method List / Definition Locations
CMTCFG(statements)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:420
.
OAR.DescretizedCFG
— MethodDescretizedCFG(N::Vector{String}; bins) -> OAR.CFG{String}
Summary
Wrapper for creating a DescretizedCFG from just a vector of nonterminal symbol names as strings.
This function turns the vector of strings in to a statement and passes it to the actual constructor.
Arguments
N::Vector{String}
: the nonterminal symbol names as a vector of strings.bins::Integer=10
: optional, the granularity/number of bins.
Method List / Definition Locations
DescretizedCFG(N; bins)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:224
.
OAR.DescretizedCFG
— MethodDescretizedCFG(S::Array{GSymbol{T}, 1}; bins) -> OAR.CFG
Summary
Creates a grammer for discretizing a set of symbols into a number of bins.
Arguments
N::Statement{T} where T <: Any
: the set of non-terminal grammar symbols to use for binning.bins::Integer=10
: optional, the granularity/number of bins.
Method List / Definition Locations
DescretizedCFG(N; bins)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:224
.
DescretizedCFG(S; bins)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:235
.
OAR.NonTerminal
— MethodNonTerminal(data) -> GSymbol
Summary
Convenience consructor for a nonterminal grammar symbol.
Arguments
data::T where T <: Any
: the piece of data comprising the grammar symbol of any type.
Method List / Definition Locations
NonTerminal(data)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/symbols.jl:68
.
OAR.SPOCFG
— MethodSPOCFG(
statements::Array{Array{GSymbol{T}, 1}, 1}
) -> OAR.CFG{String}
Summary
Constructs a context-free grammar that uses only simple subject-predicate-object statements.
Arguments
statements::Statements{T} where T <: Any
: the statements generated by the grammar, used to generate production rules, etc.
Method List / Definition Locations
SPOCFG(statements)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:160
.
OAR.Terminal
— MethodTerminal(data) -> GSymbol
Summary
Convenience constructor for a terminal grammar symbol.
Arguments
data::T where T <: Any
: the piece of data comprising the grammar symbol of any type.
Method List / Definition Locations
Terminal(data)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/symbols.jl:56
.
OAR._save_plot
— Method_save_plot(p::Plots.Plot, filename::AbstractString) -> Any
Summary
Wrapper for how figures are saved in the OAR 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/OAR/OAR/src/lib/utils/plot.jl:15
.
OAR._save_table
— Method_save_table(table, filename::AbstractString) -> Any
Summary
Wrapper for how tables are saved in the OAR 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/OAR/OAR/src/lib/utils/plot.jl:26
.
OAR._show_datasplit
— Method_show_datasplit(io::IO, data::OAR.TTDataset, dim::Int64)
Summary
Internal function for handling how to show OAR.TTDataset
s.
Method List / Definition Locations
_show_datasplit(io, data, dim)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:110
.
OAR.accommodate_vector!
— Methodaccommodate_vector!(vec::Array{T, 1}, goal_len::Integer)
Summary
Extends a vector to a goal length with zeros of its element type to accommodate in-place updates.
Arguments
vec::Vector{T}
: a vector of arbitrary element type.goal_len::Integer
: the length that the vector should be.
Method List / Definition Locations
accommodate_vector!(vec, goal_len)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:229
.
OAR.activation
— Methodactivation(
node::ProtoNode,
statement::Array{GSymbol{T}, 1} where T
) -> Float64
Summary
Computes the ART activation of a statement on an OAR.ProtoNode
.
Arguments
node::ProtoNode
: theOAR.ProtoNode
node to compute the activation for.statement::Statement
: theOAR.Statement
used for computing the activation.
Method List / Definition Locations
activation(node, statement)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:179
.
OAR.activation
— Methodactivation(node::ProtoNode, statement::TreeNode) -> Float64
Summary
Computes the ART activation of a statement on an OAR.ProtoNode
.
Arguments
node::ProtoNode
: theOAR.ProtoNode
node to compute the activation for.statement::TreeNode
: theOAR.TreeNode
used for computing the activation.
Method List / Definition Locations
activation(node, statement)
defined at /home/runner/work/OAR/OAR/src/lib/start/tn_functions.jl:57
.
OAR.activation_match!
— Methodactivation_match!(
art::OAR.SingleSTART,
statement::Union{TreeNode, Array{GSymbol{T}, 1} where T}
)
Summary
Computes the activation and match values in place, extending the T
and M
vectors if necessary.
Arguments
art::START
:statement::SomeStatement
Method List / Definition Locations
activation_match!(art, statement)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:250
.
OAR.add_node!
— Methodadd_node!(art::OAR.SingleSTART; new_cluster)
Summary
Adds an empty node to the end of the OAR.START
module.
Arguments
art::START
: theOAR.START
module to append a node to.
Method List / Definition Locations
add_node!(art; new_cluster)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:26
.
OAR.add_subtree_terminals
— Methodadd_subtree_terminals(
terminals::Set{GSymbol{String}},
statement::TreeNode
)
Summary
Recursive function for adding terminal symbols to a set.
Arguments
terminals::Set{STARTSymbol}
: the set for adding/tracking all terminals.statement::TreeStatment
: the current statement being processed.
Method List / Definition Locations
add_subtree_terminals(terminals, statement)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:330
.
OAR.average
— Methodaverage(field::AbstractVector{T} where T<:Real) -> Float64
Summary
Average linkage DDVFA similarity function.
Arguments
field::RealVector
: the DDVSTART START F2 node field (F2.T or F2.M) to compute the linkage for.
Method List / Definition Locations
average(field)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:292
.
OAR.check_if_piped
— Methodcheck_if_piped(
data_dict::DataFrames.DataFrame,
name::AbstractString
) -> Any
Summary
Checks the data dictionary if the named variable is piped.
Arguments
data_dict::DataFrame
: the data_dictionary containing attributes about variables, such as if they are piped or not.name::AbtractString
: the variable name to identify if it is piped.
Method List / Definition Locations
check_if_piped(data_dict, name)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:284
.
OAR.cluster_rand
— Methodcluster_rand(
art::OAR.AbstractSTART,
data::Array{Array{GSymbol{T}, 1}, 1} where T,
truth::Vector{Int64}
) -> NTuple{4, Float64}
Summary
Arguments
art::AbstractSTART
:data::Statements
:
Method List / Definition Locations
cluster_rand(art, data, truth)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:256
.
OAR.cluster_rand_data
— Methodcluster_rand_data(
art::OAR.AbstractSTART,
data::OAR.DataSplitGeneric
) -> NTuple{4, Float64}
Summary
Arguments
art::AbstractSTART
:data::DataSplitGeneric
:
Method List / Definition Locations
cluster_rand_data(art, data)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:278
.
OAR.cluster_serial
— Methodcluster_serial(
art::OAR.AbstractSTART,
data::Array{Array{GSymbol{T}, 1}, 1} where T
) -> Vector{Int64}
Summary
Arguments
art::AbstractSTART
:data::Statements
:
Method List / Definition Locations
cluster_serial(art, data)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:213
.
OAR.cluster_stats_plot
— Methodcluster_stats_plot(
df::DataFrames.DataFrame;
avg,
err,
n,
fontsize,
kwargs...
) -> Plots.Plot
Summary
Generates the plot for the cluster statistics.
Arguments
df::DataFrame
: the dataframe with the clusters vs. rho to plot.avg::Bool=false
: flag for using the sliding average procedure.err::Bool=false
: flag for using a StatsPlotserrorline!
.n::Integer=10
: used ifavg
is high, the size of the sliding window.
Method List / Definition Locations
cluster_stats_plot(df; avg, err, n, fontsize, kwargs...)
defined at /home/runner/work/OAR/OAR/src/lib/utils/plot.jl:111
.
OAR.complete
— Methodcomplete(field::AbstractVector{T} where T<:Real) -> Float64
Summary
Complete linkage DDVFA similarity function.
Arguments
field::RealVector
: the DDVSTART START F2 node field (F2.T or F2.M) to compute the linkage for.
Method List / Definition Locations
complete(field)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:301
.
OAR.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/OAR/OAR/src/lib/utils/drwatson.jl:53
.
OAR.create_category!
— Methodcreate_category!(
art::DDVSTART,
statement::Union{TreeNode, Array{GSymbol{T}, 1} where T},
label::Integer
)
Summary
Create a new category in a DDVSTART module, initiated on SomeStatement
and a corresponding integer label.
Arguments
art::DDVSTART
: theDDVSTART
module to append a new local F2 category to.statement::SomeStatement
: the statement to initialize the new category on.label::Integer
: the global label for the new category.
Method List / Definition Locations
create_category!(art, statement, label)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:339
.
OAR.create_category!
— Methodcreate_category!(
art::OAR.SingleSTART,
statement::Union{TreeNode, Array{GSymbol{T}, 1} where T},
label::Integer;
new_cluster
)
Summary
Adds a recursively-generated OAR.ProtoNode
to the OAR.START
module.
Arguments
art::START
: theOAR.START
to append a new node to.
Method List / Definition Locations
create_category!(art, statement, label; new_cluster)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:69
.
OAR.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/OAR/OAR/src/lib/utils/drwatson.jl:42
.
OAR.df_to_dicts
— Methoddf_to_dicts(
df::DataFrames.DataFrame
) -> Vector{Dict{String, Any}}
Summary
Turns a DataFrame into a vector of dictionaries from its rows.
Arguments
df::DataFrame
: the DataFrame to turn into a vector of dictionaries.
Method List / Definition Locations
df_to_dicts(df)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:737
.
OAR.df_to_statements
— Functiondf_to_statements(
df::DataFrames.DataFrame
) -> Tuple{Vector{GSymbol{String}}, Vector{Vector{GSymbol{String}}}, Any}
df_to_statements(
df::DataFrames.DataFrame,
label::Symbol
) -> Tuple{Vector{GSymbol{String}}, Vector{Vector{GSymbol{String}}}, Any}
df_to_statements(
df::DataFrames.DataFrame,
label::Symbol,
ignores::Vector{Symbol};
stringify
) -> Tuple{Vector{GSymbol{String}}, Vector{Vector{GSymbol{String}}}, Any}
Summary
Convert a dataframe into a ordered vector of nonterminals, simple statements in those positions, and their labels.
Arguments
df::DataFrame
: the dataframe containing rows corresponding to simple statements.label::Symbol=:class
: the symbolic name of the column corresponding to the target labels.
Method List / Definition Locations
df_to_statements(df)
df_to_statements(df, label)
df_to_statements(df, label, ignores; stringify)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:452
.
OAR.df_to_trees
— Methoddf_to_trees(
data::DataFrames.DataFrame,
data_dict::DataFrames.DataFrame
) -> Vector{TreeNode}
Summary
Turns a protein data DataFrame into a vector of OAR.TreeNode
s.
Arguments
data::DataFrame
: the DataFrame containing rows of elements to turn into statements viaOAR.TreeNode
s.data_dict::DataFrame
: the DataFrame containing attributes about the columns of the protein data, such as if they are piped or not.
Method List / Definition Locations
df_to_trees(data, data_dict)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:296
.
OAR.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/OAR/OAR/src/lib/utils/file.jl:86
.
OAR.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/OAR/OAR/src/lib/utils/file.jl:60
.
OAR.full_save_sim
— Methodfull_save_sim(
dir_func::Function,
d::AbstractDict,
fulld::AbstractDict
)
Summary
Common save function for simulations without ignores.
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
full_save_sim(dir_func, d, fulld)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:299
.
OAR.gen_STARTStats
— Methodgen_STARTStats() -> Dict{String, Any}
Summary
Constructor for prepopulating the stats dictionary.
Method List / Definition Locations
gen_STARTStats()
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:136
.
OAR.get_argparsesettings
— Functionget_argparsesettings() -> Any
get_argparsesettings(description::AbstractString) -> Any
Summary
Common function for how ArgParse.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/OAR/OAR/src/lib/utils/file.jl:43
.
OAR.get_cmt_parser
— Methodget_cmt_parser() -> Lerche.Lark
Summary
Constructs and returns a parser for the KG edge attributes data.
Method List / Definition Locations
get_cmt_parser()
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:96
.
OAR.get_data_package_names
— Functionget_data_package_names() -> Vector{Any}
get_data_package_names(
topdir::AbstractString
) -> Vector{Any}
Summary
Loads the data packages datasets and their grammars.
Method List / Definition Locations
get_data_package_names()
get_data_package_names(topdir)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:677
.
OAR.get_gramart_instance_counts
— Methodget_gramart_instance_counts(art::START) -> Vector{Int64}
Summary
START utility: returns a list of the instance counts for each OAR.START
prototype.
Arguments
art::START
: theOAR.START
module to analyze.
Method List / Definition Locations
get_gramart_instance_counts(art)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:297
.
OAR.get_iris_parser
— Methodget_iris_parser() -> Lerche.Lark
Summary
Constructs and returns a Lerche parser for the symbolic IRIS dataset.
Method List / Definition Locations
get_iris_parser()
defined at /home/runner/work/OAR/OAR/src/lib/parsers/iris.jl:25
.
OAR.get_kg_parser
— Methodget_kg_parser() -> Lerche.Lark
Summary
Constructs and returns a parser for the KG edge attributes data.
Method List / Definition Locations
get_kg_parser()
defined at /home/runner/work/OAR/OAR/src/lib/parsers/kg.jl:34
.
OAR.get_kg_statements
— Methodget_kg_statements(
file::AbstractString
) -> Vector{Vector{GSymbol{String}}}
Summary
Loads the KG edge data file, parses the lines, and returns a vector of statements for START.
Arguments
file::AbstractString
: the location of the edge data file.
Method List / Definition Locations
get_kg_statements(file)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/kg.jl:69
.
OAR.get_mldata
— Functionget_mldata(mldataset::Symbol) -> Any
get_mldata(mldataset::Symbol, download_local::Bool) -> Any
Summary
Wrapper for downloading and/or loading a dataset from MLDatasets.
Arguments
mldataest::Symbol
: the symbolic name of the MLDataset to download/load.download_local::Bool=false
: default false, flag to download the dataset to the local cache directory.
Method List / Definition Locations
get_mldata(mldataset)
get_mldata(mldataset, download_local)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:189
.
OAR.get_piped_parser
— Methodget_piped_parser() -> Lerche.Lark
Summary
Constructs and returns a parser for just piped strings.
Method List / Definition Locations
get_piped_parser()
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:228
.
OAR.get_positive_dist
— Methodget_positive_dist(
art::START,
nonterminal::AbstractString,
index::Integer
) -> Dict{GSymbol{String}, Float64}
Summary
START utility: gets the positive distribution.
Arguments
art::START
: theOAR.START
module to analyze.nonterminal::AbstractString
: the string name of the nonterminal position to analyze.index::Integer
: the index of theOAR.ProtoNode
to analyze.
Method List / Definition Locations
get_positive_dist(art, nonterminal, index)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:276
.
OAR.get_production_rules
— Methodget_production_rules(
N::Array{GSymbol{T}, 1},
statements::Array{Array{GSymbol{T}, 1}, 1}
) -> Dict{GSymbol{_A}, Set{GSymbol{_A}}} where _A
Summary
Generates simple production rules from a vector of statements and the nonterminals corresponding to them.
Arguments
N:Statement{T} where T <: Any
: the ordered nonterminals corresponding to the columns of the statement.statements::Statements{T} where
: the list of statements used for generating the production rules.
Method List / Definition Locations
get_production_rules(N, statements)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:132
.
OAR.get_terminals
— Methodget_terminals(
statements::Array{Array{GSymbol{T}, 1}, 1}
) -> Set
Summary
Generates a set of unique terminal symbols from a list of statements.
Arguments
statements::Statements{T} where T <: Any
: the statements to dissect into a set of terminals.
Method List / Definition Locations
get_terminals(statements)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:113
.
OAR.get_tree_production_rules
— Methodget_tree_production_rules(
N::Vector{GSymbol{String}},
statements::Vector{TreeNode}
) -> Dict{GSymbol{String}, Set{GSymbol{String}}}
Summary
Takes a set of nonterminals and a set of statements and returns their corresponding production rules.
Arguments
N::Vector{STARTSymbol}
: the nonterminal symbols of the grammar.statements::TreeStatements
: the statements to infer production rules from.
Method List / Definition Locations
get_tree_production_rules(N, statements)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:383
.
OAR.get_tree_terminals
— Methodget_tree_terminals(
statements::Vector{TreeNode}
) -> Set{GSymbol{String}}
Summary
Gets all of the terminal symbols contained in a set of OAR.TreeStatements
.
Arguments
statements::TreeStatments
: the statements containing terminal symbols.
Method List / Definition Locations
get_tree_terminals(statements)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:352
.
OAR.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/OAR/OAR/src/lib/utils/plot.jl:86
.
OAR.inc_update_symbols!
— Methodinc_update_symbols!(
pn::ProtoNode,
nonterminal::GSymbol{String},
symb::GSymbol{String},
terminated::Bool
)
Summary
Updates the tree of OAR.ProtoNode
from a single terminal.
Arguments
pn::ProtoNode
: the top of theOAR.ProtoNode
tree to update.nonterminal::STARTSymbol
: the nonterminal symbol of the statement to update at.symb::STARTSymbol
: the terminal symbol to update everywhere.
Method List / Definition Locations
inc_update_symbols!(pn, nonterminal, symb, terminated)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:122
.
OAR.integer_encoding
— Methodinteger_encoding(vec) -> Any
Summary
Internal implementation of integer encoding.
Arguments
vec
: some iterable collection containing unique elements to turn into a vector of integers.
Method List / Definition Locations
integer_encoding(vec)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:489
.
OAR.is_nonterminal
— Methodis_nonterminal(
grammar::OAR.Grammar{T},
symb::GSymbol{T}
) -> Any
Summary
Checks if a symbol is non-terminal in the grammar.
Arguments
grammar::Grammar{T} where T <: Any
: a subtype of the abstractOAR.Grammar{T}
type.symb::GSymbol
: the grammar symbol to use.
Method List / Definition Locations
is_nonterminal(grammar, symb)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:316
.
OAR.is_terminal
— Methodis_terminal(symb::GSymbol) -> Bool
Summary
Checks if the OAR.GSymbol
is a terminal grammar symbol.
Arguments
symb::GSymbol
: theOAR.GSymbol
to check.
Method List / Definition Locations
is_terminal(symb)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/symbols.jl:100
.
OAR.is_terminal
— Methodis_terminal(treenode::TreeNode) -> Bool
Summary
Checks if the OAR.TreeNode
contains a terminal symbol.
Arguments
treenode::TreeNode
: theOAR.TreeNode
to containing theOAR.GSymbol
to check if terminal.
Method List / Definition Locations
is_terminal(treenode)
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:233
.
OAR.is_terminal
— Methodis_terminal(
grammar::OAR.Grammar{T},
symb::GSymbol{T}
) -> Any
Summary
Checks if a symbol is terminal in the grammar.
Arguments
grammar::Grammar{T} where T <: Any
: a subtype of the abstractOAR.Grammar{T}
type.symb::GSymbol
: the grammar symbol to use.
Method List / Definition Locations
is_terminal(grammar, symb)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:306
.
is_terminal(symb)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/symbols.jl:100
.
is_terminal(treenode)
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:233
.
OAR.join_gsymbol
— Methodjoin_gsymbol(
symb::GSymbol{T<:AbstractString},
num::Integer;
terminal
) -> GSymbol{String}
Summary
Returns a new OAR.GSymbol
by adding a suffix.
Arguments
symb::GSymbol{T} where T <: AbstractString
: the original symbol to append a suffix to.num::Integer
: the integer to add as a suffix to the symbol.terminal::Bool=true
: optional (default true), to set the new symbol as terminal.
Method List / Definition Locations
join_gsymbol(symb, num; terminal)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/symbols.jl:87
.
OAR.learn!
— Methodlearn!(
art::OAR.AbstractSTART,
statement::Array{GSymbol{T}, 1} where T,
index::Integer
)
Summary
Processes a statement for a OAR.START
module.
Arguments
art::START
: theOAR.START
to update with the statement.statement::Statement
: the grammarOAR.Statement
to process.index::Integer
: the index of theOAR.ProtoNode
to update.
Method List / Definition Locations
learn!(art, statement, index)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:153
.
OAR.learn!
— Methodlearn!(gramart::START, statement::TreeNode, index::Integer)
Summary
Processes a statement for a OAR.START
module.
Arguments
gramart::START
: theOAR.START
to update with the statement.statement::TreeNode
: the grammarOAR.TreeNode
to process.index::Integer
: the index of theOAR.ProtoNode
to update.
Method List / Definition Locations
learn!(gramart, statement, index)
defined at /home/runner/work/OAR/OAR/src/lib/start/tn_functions.jl:16
.
OAR.load_cmt
— Methodload_cmt(file::AbstractString) -> DataFrames.DataFrame
Summary
Loads and sanitizes the CMT protein dataframe.
Arguments
file::AbstractString
: the location of the CSV file containing CMT protein data.
Method List / Definition Locations
load_cmt(file)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:152
.
OAR.load_cmt_dict
— Methodload_cmt_dict(file::AbstractString) -> DataFrames.DataFrame
Summary
Loads and sanitizes the CMT data dictionary file.
Arguments
file::AbstractString
: the location of the data dictionary CSV file.
Method List / Definition Locations
load_cmt_dict(file)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:184
.
OAR.load_config
— Methodload_config(config_file::AbstractString) -> Any
Summary
Loads the provided configuration YAML file.
Arguments
config_file::AbstractString
: the config file name as a string.
Method List / Definition Locations
load_config(config_file)
defined at /home/runner/work/OAR/OAR/src/lib/utils/file.jl:26
.
OAR.load_data_package
— Functionload_data_package() -> Dict{String, Any}
load_data_package(
topdir::AbstractString
) -> Dict{String, Any}
Summary
Loades the datasets and grammars from the data package experiment.
Arguments
topdir::AbstractString
: defaultdata_dir("data-package")
, the directory containing the CSV data package files.
Method List / Definition Locations
load_data_package()
load_data_package(topdir)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:703
.
OAR.load_dataframe
— Methodload_dataframe(
savename::AbstractString
) -> DataFrames.DataFrame
Summary
Wrapper for how to load DataFrames in the OAR
project.
Arguments
savename::AbstractString
: the location of the saved dataframe.
Method List / Definition Locations
load_dataframe(savename)
defined at /home/runner/work/OAR/OAR/src/lib/utils/file.jl:137
.
OAR.match
— Methodmatch(
node::ProtoNode,
statement::Array{GSymbol{T}, 1} where T
) -> Float64
Summary
Computes the ART match of a statement on an OAR.ProtoNode
.
Arguments
node::ProtoNode
: theOAR.ProtoNode
node to compute the match for.statement::Statement
: theOAR.Statement
used for computing the match.
Method List / Definition Locations
match(node, statement)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:204
.
OAR.match
— Methodmatch(node::ProtoNode, statement::TreeNode) -> Float64
Summary
Computes the ART match of a statement on an OAR.ProtoNode
.
Arguments
node::ProtoNode
: theOAR.ProtoNode
node to compute the match for.statement::TreeNode
: theOAR.TreeNode
used for computing the match.
Method List / Definition Locations
match(node, statement)
defined at /home/runner/work/OAR/OAR/src/lib/start/tn_functions.jl:88
.
OAR.median
— Methodmedian(field::AbstractVector{T} where T<:Real) -> Float64
Summary
Median linkage DDVFA similarity function.
Arguments
field::RealVector
: the DDVSTART START F2 node field (F2.T or F2.M) to compute the linkage for.
Method List / Definition Locations
median(field)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:310
.
OAR.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/OAR/OAR/src/lib/utils/drwatson.jl:64
.
OAR.parse_grammar
— Methodparse_grammar(
grammar::OAR.Grammar{T},
statement::Array{GSymbol{T}, 1}
)
Summary
Parses and checks that a statement is permissible under a grammer.
Arguments
grammar::Grammar{T} where T <: Any
: a subtype of the abstractOAR.Grammar{T}
type.statement::Statement{T} where T <: Any
: a grammar [OAR.Statement
] to check the validity of.s
Method List / Definition Locations
parse_grammar(grammar, statement)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:286
.
OAR.print_treenode_children
— Methodprint_treenode_children(
io::IO,
node::TreeNode,
level::Integer,
last::Bool
)
Summary
Prints a tree string for displaying children of a OAR.TreeNode
, used in the Base.show
overload.
Arguments
io::IO
: the current IO stream.node::TreeNode
: theOAR.TreeNode
with children to display
Method List / Definition Locations
print_treenode_children(io, node, level, last)
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:264
.
OAR.protein_df_to_strings
— Methodprotein_df_to_strings(
df::DataFrames.DataFrame
) -> Vector{String}
Summary
Turns the CMT protein DataFrame into a vector of string statements.
Arguments
df::DataFrame
: the sanitized CMT protein data DataFrame.
Method List / Definition Locations
protein_df_to_strings(df)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:199
.
OAR.quick_statement
— Methodquick_statement(data::Array{T, 1}; terminal) -> Any
Summary
Creates a OAR.Statement
from a vector of elements of arbitrary type.
Arguments
data::Vector{T} where T <: Any
: a vector of any type for creating aOAR.Statement
of symbols of that type.terminal::Bool=false
: optional, if the symbols of the statement are terminal.
Method List / Definition Locations
quick_statement(data; terminal)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:194
.
OAR.random_produce
— Methodrandom_produce(
grammar::OAR.Grammar{T},
symb::GSymbol{T}
) -> Any
Summary
Produces a random terminal from the non-terminal using the corresponding production rule.
Arguments
grammar::Grammar{T} where T <: Any
: a subtype of the abstractOAR.Grammar{T}
type.symb::GSymbol
: the grammar symbol to use.
Method List / Definition Locations
random_produce(grammar, symb)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:296
.
OAR.random_statement
— Methodrandom_statement(grammar::OAR.Grammar{T}) -> Vector
Summary
Generates a random statement from a grammar.
Arguments
grammar::Grammar{T} where T <: Any
: a subtype of the abstractOAR.Grammar{T}
type.
Method List / Definition Locations
random_statement(grammar)
defined at /home/runner/work/OAR/OAR/src/lib/grammar/grammar.jl:326
.
OAR.real_to_symb
— Methodreal_to_symb(
data::OAR.DataSplit,
labels::Vector{String};
bins
) -> Tuple{OAR.VectoredDataSplit{GSymbol{String}, Int64}, OAR.CFG{String}}
Summary
Turns a OAR.DataSplit
into a binned symbolic variant for use with START.
Arguments
data::DataSplit
: theOAR.DataSplit
to convert to symbols.labels::Vector{String}
: the labels corresponding to the non-terminal symbol names for the feature categories and their subsequent terminal variants.bins::Int=10
: optional, the number of symbols to descretize the real-valued data to.
Method List / Definition Locations
real_to_symb(data, labels; bins)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:298
.
OAR.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/OAR/OAR/src/lib/utils/drwatson.jl:31
.
OAR.run_parser
— Methodrun_parser(parser::Lerche.Lark, text::AbstractString) -> Any
Summary
Wrapper for running a parser with a given piece of text in the form of a string.
Method List / Definition Locations
run_parser(parser, text)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/common.jl:11
.
OAR.save_dataframe
— Methodsave_dataframe(
df::DataFrames.DataFrame,
savename::AbstractString
)
Summary
Wrapper for how to save DataFrames in the OAR
project.
Arguments
df::DataFrame
: the dataframe to save.savename::AbstractString
: the location to save the dataframe.
Method List / Definition Locations
save_dataframe(df, savename)
defined at /home/runner/work/OAR/OAR/src/lib/utils/file.jl:123
.
OAR.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/OAR/OAR/src/lib/utils/plot.jl:49
.
OAR.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/OAR/OAR/src/lib/experiments.jl:16
.
OAR.shuffle_dataset
— Methodshuffle_dataset(ds::OAR.VectoredDataset) -> Any
Summary
Creates a new VectoredDataset
with shuffled training examples.
Arguments
ds::VectoredDataset
: the originalVectoredDataset
dataset.
Method List / Definition Locations
shuffle_dataset(ds)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:224
.
OAR.shuffle_pairs
— Methodshuffle_pairs(features, labels) -> Tuple{Any, Any}
Summary
Wrapper for shuffling features and their labels.
Arguments
features
: the set of data features.labels
: the set of labels corresponding to the features.
Method List / Definition Locations
shuffle_pairs(features, labels)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:210
.
OAR.sim_tt_serial
— Methodsim_tt_serial(
d::AbstractDict,
dir_func::Function,
opts::AbstractDict
)
Summary
Trains and tests a START module on the provided statements.
Arguments
d::AbstractDict
: the simulation options dictionary.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
sim_tt_serial(d, dir_func, opts)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:329
.
OAR.similarity
— Methodsimilarity(
method::Symbol,
F2::START,
activation::Bool
) -> Float64
Summary
Computes the similarity of the selected linkage method.
Arguments
method::Symbol
: the linkage method function name as a Julia Symbol.F2::START
: the F2 module to compute the similarity for.activation::Bool
: flag for if the computed similarity is the activation or match.
Method List / Definition Locations
similarity(method, F2, activation)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:261
.
OAR.single
— Methodsingle(field::AbstractVector{T} where T<:Real) -> Float64
Summary
Single linkage DDVFA similarity function.
Arguments
field::RealVector
: the DDVSTART START F2 node field (F2.T or F2.M) to compute the linkage for.
Method List / Definition Locations
single(field)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:283
.
OAR.sliding_avg
— Methodsliding_avg(
vs::AbstractVector{T} where T<:Real,
n::Integer
) -> Any
Summary
Computes the sliding window average of a vector with window size n
.
Arguments
vs::RealVector
: the original vector for sliding window averages.n::Integer
: the size of the sliding window.
Method List / Definition Locations
sliding_avg(vs, n)
defined at /home/runner/work/OAR/OAR/src/lib/utils/plot.jl:72
.
OAR.symbolic_cluster_dataset
— Methodsymbolic_cluster_dataset(
filename::AbstractString
) -> Tuple{Vector{Vector{GSymbol{String}}}, OAR.CFG{String}}
Summary
Generates a OAR.DataSplitGeneric
and OAR.CFG
grammart from the provided CSV dataset.
Arguments
filename::AbstractString=data_dir("mushroom", "mushrooms.csv")
: the location of the file to load with a default value.
Method List / Definition Locations
symbolic_cluster_dataset(filename)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:653
.
OAR.symbolic_dataset
— Functionsymbolic_dataset(
filename::AbstractString
) -> Tuple{OAR.VectoredDataSplit{GSymbol{String}, Int64}, OAR.CFG{String}}
symbolic_dataset(
filename::AbstractString,
bins::Int64
) -> Tuple{OAR.VectoredDataSplit{GSymbol{String}, Int64}, OAR.CFG{String}}
Summary
Generates a OAR.DataSplitGeneric
and OAR.CFG
grammart from the provided CSV dataset.
Arguments
filename::AbstractString
: the location of the file to load with a default value.bins::Int=10
: the number of symbol bins for each feature, default 10.
Method List / Definition Locations
symbolic_dataset(filename)
symbolic_dataset(filename, bins)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:621
.
OAR.symbolic_iris
— Methodsymbolic_iris(
;
bins,
download_local
) -> Tuple{OAR.VectoredDataSplit{GSymbol{String}, Int64}, OAR.CFG{String}}
Summary
Quickly generates a [OAR.VectoredDataSplit
] of the symbolic Iris dataset.
Arguments
bins::Int=10
: optional, the number of symbols to descretize the real-valued data to.download_local::Bool=false
: optional (default false), to download the Iris dataset to the local datadir.
Method List / Definition Locations
symbolic_iris(; bins, download_local)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:392
.
OAR.symbolic_lung_cancer
— Functionsymbolic_lung_cancer(
) -> Tuple{OAR.DataSplitGeneric, OAR.CFG{String}}
symbolic_lung_cancer(
filename::AbstractString
) -> Tuple{OAR.DataSplitGeneric, OAR.CFG{String}}
Summary
Generates a OAR.DataSplitGeneric
and OAR.CFG
grammart from the Lung Cancer dataset.
Arguments
filename::AbstractString=data_dir("lung-cancer", "lung-cancer.csv")
: the location of the file to load with a default value.
Method List / Definition Locations
symbolic_lung_cancer()
symbolic_lung_cancer(filename)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:589
.
OAR.symbolic_mushroom
— Functionsymbolic_mushroom(
) -> Tuple{OAR.DataSplitGeneric, OAR.CFG{String}}
symbolic_mushroom(
filename::AbstractString
) -> Tuple{OAR.DataSplitGeneric, OAR.CFG{String}}
Summary
Generates a OAR.DataSplitGeneric
and OAR.CFG
grammart from the Mushroom dataset.
Arguments
filename::AbstractString=data_dir("mushroom", "mushrooms.csv")
: the location of the file to load with a default value.
Method List / Definition Locations
symbolic_mushroom()
symbolic_mushroom(filename)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:568
.
OAR.symbolic_wine
— Methodsymbolic_wine(
;
bins,
download_local
) -> Tuple{OAR.VectoredDataSplit{GSymbol{String}, Int64}, OAR.CFG{String}}
Summary
Quickly generates a [OAR.VectoredDataSplit
] of the symbolic Wine dataset.
Arguments
bins::Int=10
: optional, the number of symbols to descretize the real-valued data to.download_local::Bool=false
: optional (default false), to download the Wine dataset to the local datadir.
Method List / Definition Locations
symbolic_wine(; bins, download_local)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:416
.
OAR.tc_start
— Methodtc_start(
d::AbstractDict,
ts::Union{Vector{TreeNode}, Array{Array{GSymbol{T}, 1}, 1} where T},
dir_func::Function,
opts::AbstractDict
)
Summary
Trains and classifies a START module on the provided statements.
Arguments
d::AbstractDict
: the simulation options dictionary.ts::SomeStatements
: a set of statements of typeUnion{TreeStatements, Statements}
.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
tc_start(d, ts, dir_func, opts)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:51
.
OAR.tt_gramart
— Methodtt_gramart(
d::AbstractDict,
data::OAR.VectoredDataset,
dir_func::Function,
opts::AbstractDict
)
Summary
Trains and tests a START module on the provided statements.
Arguments
d::AbstractDict
: the simulation options dictionary.data::VectoredDataset
: the dataset 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
tt_gramart(d, data, dir_func, opts)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:105
.
OAR.tt_real
— Methodtt_real(mldataset::Symbol; download_local) -> OAR.DataSplit
Summary
Loads the Iris dataset and returns a OAR.DataSplit
.
Arguments
download_local::Bool=false
: optional (default false), to download the Iris dataset to the local datadir.
Method List / Definition Locations
tt_real(mldataset; download_local)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:273
.
OAR.tt_serial
— Methodtt_serial(
art::OAR.AbstractSTART,
data::OAR.VectoredDataset;
display
) -> Tuple{Any, Any}
Summary
A single train-test serial experiment, taking a preconstructed ART module and training/testing on a set of data.
Arguments
art::AbstractSTART
:data::VectoredDataset
:- `display::Bool=false: optional, default false.
dv::Bool=false
: optional, default false.
Method List / Definition Locations
tt_serial(art, data; display)
defined at /home/runner/work/OAR/OAR/src/lib/experiments.jl:164
.
OAR.update_dist!
— Methodupdate_dist!(pn::ProtoNode, symb::GSymbol{String})
Summary
Updates the distribution of a single OAR.ProtoNode
from one new symbol instance.
Arguments
pn::ProtoNode
: theOAR.ProtoNode
to update the distribution with.symb::STARTSymbol
: the symbol instance to update theOAR.ProtoNode
with.
Method List / Definition Locations
update_dist!(pn, symb)
defined at /home/runner/work/OAR/OAR/src/lib/start/functions.jl:95
.
OAR.vector_to_tree
— Methodvector_to_tree(
local_vec::Vector{GSymbol{String}},
nonterminal::AbstractString
) -> TreeNode
Summary
Turns a vector of STARTSymbols into a nonterminal OAR.TreeNode
with children.
Arguments
local_vec::Vector{STARTSymbol}
: the vector to turn into aOAR.TreeNode
.nonterminal::AbstractString
: the nonterminal string name at the top of the tree.
Method List / Definition Locations
vector_to_tree(local_vec, nonterminal)
defined at /home/runner/work/OAR/OAR/src/lib/parsers/cmt.jl:257
.
OAR.weighted
— Methodweighted(F2::START, activation::Bool)
Summary
Weighted linkage DDVFA similarity function.
Arguments:
F2::START
: the DDVSTART START F2 node to compute the linkage method within.activation::Bool
: flag to use the activation function. False uses the match function.
Method List / Definition Locations
weighted(F2, activation)
defined at /home/runner/work/OAR/OAR/src/lib/start/ddv.jl:321
.
OAR.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/OAR/OAR/src/lib/utils/drwatson.jl:20
.
Types
OAR.ARTNode
— Typeabstract type ARTNode
Summary
Definition of the ARTNode supertype.
Fields
OAR.AbstractSTART
— Typeabstract type AbstractSTART
Summary
Abstract type for all START-type modules.
Fields
OAR.CFG
— Typestruct CFG{U} <: OAR.Grammar{U}
Summary
Context-Free Grammar
.
Consists of a set of terminal symbols, non-terminal symbols, and production rules of Backus-Naur Form.
Fields
N::Set{GSymbol{U}} where U
: Non-terminal symbols of the grammar.
T::Set{GSymbol{U}} where U
: Terminal symbols of the grammar.
S::Array{GSymbol{U}, 1} where U
: Definition of a statement in this grammar.
P::Dict{GSymbol{U}, Set{GSymbol{U}}} where U
: The set of production rules of the grammar of the Backus-Naur Form (CFG).
OAR.CFG
— MethodEmpty constructor for a Context-Free Grammar.
OAR.CFG
— MethodConstructor for a Context-Free Grammer with an initial statement of non-terminal symbols.
Arguments
N::Statement
: an initial set of non-terminal grammar symbols.
OAR.CMTPipedTree
— Typestruct CMTPipedTree <: Lerche.Transformer
Summary
Piped statements tree.
Fields
OAR.CMTSTARTTree
— Typestruct CMTSTARTTree <: Lerche.Transformer
Summary
The CMT grammar tree subtypes from a Lerche Transformer.
Fields
OAR.CMTSymbol
— TypeCMTSymbol
Description
Alias stating that a CMT grammar symbol is a string (CMTSymbol =
GSymbol
{String}
).
OAR.ConfigDict
— TypeConfigDict
Description
Definition of a configuration dictionary loaded from a config file.
OAR.DataSplit
— Typestruct DataSplit <: OAR.TTDataset
Summary
Train/test split dataset.
This struct contains a standardized train/test split of real-valued vectors of samples arranged in a matrix and mapping to integered labels.
Fields
train_x::Matrix{Float64}
: The training data as a matrix of floating-point feature vectors:(n_features, n_samples)
.
test_x::Matrix{Float64}
: The testing data as a matrix of floating-point feature vectors:(n_features, n_samples)
.
train_y::Vector{Int64}
: The training labels as a vector of integer labels:(n_samples,)
.
test_y::Vector{Int64}
: The testing labels as a vector of integer labels:(n_samples,)
OAR.DataSplit
— MethodDataSplit(features, labels; p, shuffle) -> OAR.DataSplit
Summary
Constructor for a OAR.DataSplit
taking a set of features and options for the split ratio and shuffle flag.
Method List / Definition Locations
DataSplit(features, labels; p, shuffle)
defined at /home/runner/work/OAR/OAR/src/lib/utils/data_utils.jl:241
.
OAR.DataSplitGeneric
— Typestruct DataSplitGeneric{T, U} <: OAR.VectoredDataset
Summary
Generic train/test split dataset.
This struct contains a standardized train/test split of a vector of samples mapping to integered labels.
Fields
train_x::Any
: The training data as a vector of samples.
test_x::Any
: The testing data as a vector of samples.
train_y::Any
: The training labels as a vector of integer labels:(n_samples,)
.
test_y::Any
: The testing labels as a vector of integer labels:(n_samples,)
OAR.DataSplitGeneric
— MethodConstructor for a generic train/test dataset split.
OAR.DistributedSTART
— Typeabstract type DistributedSTART <: OAR.AbstractSTART
Summary
Abstract type for all START-type modules.
Fields
OAR.Grammar
— Typeabstract type Grammar{T}
Summary
Abstract type for formal grammars.
Fields
OAR.IRISSTARTTree
— Typestruct IRISSTARTTree <: Lerche.Transformer
Summary
The IRIS grammar tree subtypes from a Lerche Transformer.
Fields
OAR.IRISSymbol
— TypeIRISSymbol
Description
Type alias stating that a symbolic IRIS dataset symbol is a string
OAR.KGSTARTTree
— Typestruct KGSTARTTree <: Lerche.Transformer
Summary
The KG grammar tree subtypes from a Lerche Transformer.
Fields
OAR.KGStatement
— TypeKGStatement
Description
Alias stating that KG statements are vectors of KG grammar symbols (KGStatement = Vector{[
KGSymbol](@ref)
}`).
OAR.KGSymbol
— TypeOAR.ProductionRule
— TypeProductionRule
Description
Type alias (ProductionRule{T} =
OAR.SymbolSet
{T}
), a grammar production rule is a set of symbols.
OAR.ProductionRuleSet
— TypeProductionRuleSet
Description
Type alias (ProductionRuleSet{T} = Dict{
OAR.GSymbol
{T},
OAR.ProductionRule
{T}}
), a production rule set is a dictionary mapping grammar symbols to production rules.
OAR.ProtoChildren
— TypeProtoChildren
Description
Alias for how ProtoNode children are indexed (ProtoChildren = Dict{
STARTSymbol
,
ProtoNode
}
).
OAR.ProtoNodeStats
— Typemutable struct ProtoNodeStats
Summary
The mutable components of a OAR.ProtoNode
, containing options and statistics of the node.
Fields
m::Int64
: Convenience counter for the total number of symbols encountered.
terminal::Bool
: If the ProtoNode is terminal on the graph.
OAR.ProtoNodeStats
— MethodProtoNodeStats() -> OAR.ProtoNodeStats
Summary
Empty constructor for the mutable options and stats component of a OAR.ProtoNode
.
Method List / Definition Locations
ProtoNodeStats()
defined at /home/runner/work/OAR/OAR/src/lib/start/common.jl:152
.
OAR.STARTStatement
— TypeOAR.STARTStatements
— TypeOAR.STARTStats
— TypeOAR.STARTSymbol
— TypeOAR.SingleSTART
— Typeabstract type SingleSTART <: OAR.AbstractSTART
Summary
Abstract type for all START-type modules.
Fields
OAR.Statement
— TypeStatement
Description
Type alias (Statement{T} = Vector{
OAR.GSymbol
{T}}
), a statement is a vector of grammar symbols.
OAR.Statements
— TypeStatements
Description
Type alias (Statements{T} = Vector{
Statement
{T}}
), statements are a vector of the statement type.
OAR.SymbolCount
— TypeSymbolCount
Description
The structure of the counter for symbols in a ProtoNode (SymbolCount = Dict{
STARTSymbol
, Int}
).
OAR.SymbolSet
— TypeSymbolSet
Description
Type alias (SymbolSet{T} = Set{
OAR.GSymbol
{T}}
), a set of grammar symbols is implemented as a Julia set.
OAR.TTDataset
— Typeabstract type TTDataset
Summary
Abstract supertype for train/test split datasets
Fields
OAR.TerminalDist
— TypeTerminalDist
Description
Terminal Distribution definition that is a dictionary mapping from terminal symbols to probabilities (TerminalDist = Dict{
STARTSymbol
, Float}
).
OAR.TreeStatement
— TypeOAR.TreeStatements
— TypeOAR.VectoredDataSplit
— Typestruct VectoredDataSplit{T, M} <: OAR.VectoredDataset
Summary
Vectored train/test split of arbitrary feature types.
This struct contains a standardized train/test split of vectors of vectored samples that map to labels.
Fields
train_x::Array{Vector{T}, 1} where T
: Training data as a vector of feature vectors of typeT
.
test_x::Array{Vector{T}, 1} where T
: Testing data as a vector of feature vectors of typeT
.
train_y::Vector
: Training labels as a vector of typeM
.
test_y::Vector
: Testing labels as a vector of typeM
.
OAR.VectoredDataSplit
— MethodConvenience constructor, turning a OAR.DataSplit
into its vectored variant.
Arguments
data::DataSplit
: the originalOAR.DataSplit
to transform into a vectored data ssplit.
OAR.VectoredDataset
— Typeabstract type VectoredDataset <: OAR.TTDataset
Summary
Abstract supertype for datasets that have vectored elements.
Fields
OAR.opts_DDVSTART
— Typemutable struct opts_DDVSTART
Summary
DDVSTART options struct as a Parameters.jl
object.
Fields
rho_lb::Float64
: Lower-bound vigilance parameter: rho_lb ∈ [0, 1]. Default: 0.7rho_ub::Float64
: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.85alpha::Float64
: Choice parameter: alpha > 0. Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0gamma::Float64
: Pseudo kernel width: gamma >= 1. Default: 3.0gamma_ref::Float64
: Reference gamma for normalization: 0 <= gamma_ref < gamma. Default: 1.0similarity::Symbol
: Similarity method (activation and match): similarity ∈ [:single, :average, :complete, :median, :weighted, :centroid]. Default: :singleepochs::Int64
: Maximum number of epochs during training: max_epochs ∈ (1, Inf). Default: 1display::Bool
: Display flag for progress bars. Default: falsegamma_normalization::Bool
: Flag to normalize the threshold by the feature dimension. Default: true
OAR.opts_DVSTART
— Typemutable struct opts_DVSTART
Summary
DVSTART
options struct as a Parameters.jl
@with_kw
object.
Fields
rho_lb::Float64
: Lower-bound vigilance parameter: rho_lb ∈ [0, 1]. Default: 0.55rho_ub::Float64
: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.75alpha::Float64
: Choice parameter: alpha > 0. Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0epochs::Int64
: Maximum number of epochs during training. Default: 1terminated::Bool
: Flag for generating nodes at the terminal distributions below their nonterminal positions. Default: false
OAR.opts_START
— Typemutable struct opts_START
Summary
START
options struct as a Parameters.jl
@with_kw
object.
Fields
rho::Float64
: Vigilance parameter: ρ ∈ [0, 1] Default: 0.7alpha::Float64
: Choice parameter: alpha > 0. Default: 0.001beta::Float64
: Learning parameter: beta ∈ (0, 1]. Default: 1.0epochs::Int64
: Maximum number of epochs during training. Default: 1terminated::Bool
: Flag for generating nodes at the terminal distributions below their nonterminal positions. Default: false
Constants
OAR.ARG_ARGPARSE_DESCRIPTION
— ConstantARGARGPARSEDESCRIPTION
Description
Common docstring: the arguments to argparse functions taking a description.
OAR.ARG_CFG
— ConstantARG_CFG
Description
Common docstring: a CFG grammar argument.
OAR.ARG_CONFIG_FILE
— ConstantARGCONFIGFILE
Description
Common docstring: config filename argument.
OAR.ARG_FILENAME
— ConstantARG_FILENAME
Description
Common docstring: argument for a file name.
OAR.ARG_SIM_D
— ConstantARGSIMD
Description
Common docstring: argument for the simulation options dictionary.
OAR.ARG_SIM_DIR_FUNC
— ConstantARGSIMDIR_FUNC
Description
Common docstring: argument for a directory function
OAR.ARG_SIM_OPTS
— ConstantARGSIMOPTS
Description
Common docstring: argument for additional simulation options.
OAR.ARG_SIM_TS
— ConstantARGSIMTS
Description
Common docstring: argument for the simulation statements to train upon and cluster.
OAR.CMT_CLUSTERING_COLUMNS
— ConstantCMTCLUSTERINGCOLUMNS
Description
A list of the feature columns used in clustering the CMT dataset
OAR.CMT_PHENOTYPES
— ConstantCMT_PHENOTYPES
Description
A list of the phenotype columns for aggregation into one START feature.
OAR.COLORSCHEME
— ConstantPlotting colorscheme.
OAR.COMMON_DOC
— ConstantCOMMON_DOC
Description
Docstring prefix denoting that the constant is used as a common docstring element for other docstrings.
OAR.DEFAULT_N_PROCS_UNIX
— ConstantThe default number of processes to start in distributed experiments on Linux.
OAR.DEFAULT_N_PROCS_WINDOWS
— ConstantThe default number of processes to start in distributed experiments on Windows.
OAR.DEFAULT_P
— ConstantThe default split ration for train/test datasets.
OAR.DPI
— ConstantThe default plotting dots-per-inch for saving.
OAR.DRWATSON_ARGS_DOC
— ConstantDRWATSONARGSDOC
Description
Common docstring: the arguments to DrWatson
-style directory functions.
OAR.FONTFAMILY
— ConstantPlotting fontfamily for all text.
OAR.GRAMMAR_ARG
— ConstantGRAMMAR_ARG
Description
Common docstring argument for grammars.
OAR.GRAMMAR_SYMB_ARG
— ConstantGRAMMARSYMBARG
Description
Common docstring for functions using a grammar and a grammar symbol.
OAR.GSYMBOL_DATA_ARG
— ConstantGSYMBOLDATAARG
Description
Common argument docstring for GSymbol consruction.
OAR.LINEWIDTH
— ConstantPlotting linewidth.
OAR.LINKAGE_METHODS
— ConstantLINKAGE_METHODS
Description
A list of all distributed dual-vigilance similarity linkage methods.
OAR.SAVE_MAP
— ConstantSAVE_MAP
Description
Dictionary mapping the names of result save types to the private wrapper functions that implement them.
OAR.SomeStatement
— TypeSomeStatement
Description
Alias for arguments accepting multiple definitions of a statement formulation.
OAR.SomeStatements
— TypeSomeStatements
Description
Alias for arguments accepting multiple definitions of statement formulations.
OAR.alphabet
— Constantalphabet
Description
Vector of alphabetical letters as Strings for discretized feature labels.
OAR.letter_vec
— Constantletter_vec
Description
Two-letter alphabetical feature names.