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

ModulesFunctionsTypesConstants
IndexIndexIndexIndex
DocsDocsDocsDocs

Index

This section contains a list of internal names that link to their corresponding Documentation.

Modules

    Functions

    Types

    Constants

    Docs

    Documentation for all internal names are listed below.

    Modules

    Functions

    Base.showMethod
    show(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.

    source
    OAR.CFG_from_dfFunction
    CFG_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 a OAR.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.

    source
    OAR.DescretizedCFGMethod
    DescretizedCFG(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.

    source
    OAR.DescretizedCFGMethod
    DescretizedCFG(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.

    source
    OAR.SPOCFGMethod
    SPOCFG(
        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.

    source
    OAR._save_plotMethod
    _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.

    source
    OAR._save_tableMethod
    _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.

    source
    OAR.accommodate_vector!Method
    accommodate_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.

    source
    OAR.activation_match!Method
    activation_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.

    source
    OAR.add_subtree_terminalsMethod
    add_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.

    source
    OAR.averageMethod
    average(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.

    source
    OAR.check_if_pipedMethod
    check_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.

    source
    OAR.cluster_stats_plotMethod
    cluster_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 StatsPlots errorline!.
    • n::Integer=10: used if avg 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.

    source
    OAR.completeMethod
    complete(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.

    source
    OAR.create_category!Method
    create_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: the DDVSTART 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.

    source
    OAR.df_to_statementsFunction
    df_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.

    source
    OAR.df_to_treesMethod
    df_to_trees(
        data::DataFrames.DataFrame,
        data_dict::DataFrames.DataFrame
    ) -> Vector{TreeNode}
    

    Summary

    Turns a protein data DataFrame into a vector of OAR.TreeNodes.

    Arguments

    • data::DataFrame: the DataFrame containing rows of elements to turn into statements via OAR.TreeNodes.
    • 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.

    source
    OAR.dist_exp_parseFunction
    dist_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.

    source
    OAR.exp_parseFunction
    exp_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.

    source
    OAR.full_save_simMethod
    full_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.

    source
    OAR.get_argparsesettingsFunction
    get_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.

    source
    OAR.get_kg_statementsMethod
    get_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.

    source
    OAR.get_mldataFunction
    get_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.

    source
    OAR.get_positive_distMethod
    get_positive_dist(
        art::START,
        nonterminal::AbstractString,
        index::Integer
    ) -> Dict{GSymbol{String}, Float64}
    

    Summary

    START utility: gets the positive distribution.

    Arguments

    • art::START: the OAR.START module to analyze.
    • nonterminal::AbstractString: the string name of the nonterminal position to analyze.
    • index::Integer: the index of the OAR.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.

    source
    OAR.get_production_rulesMethod
    get_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.

    source
    OAR.get_terminalsMethod
    get_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.

    source
    OAR.get_tree_production_rulesMethod
    get_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.

    source
    OAR.inc_update_symbols!Method
    inc_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 the OAR.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.

    source
    OAR.is_terminalMethod
    is_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 abstract OAR.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.

    source
    OAR.join_gsymbolMethod
    join_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.

    source
    OAR.load_data_packageFunction
    load_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: default data_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.

    source
    OAR.medianMethod
    median(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.

    source
    OAR.parse_grammarMethod
    parse_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 abstract OAR.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.

    source
    OAR.real_to_symbMethod
    real_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: the OAR.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.

    source
    OAR.save_dataframeMethod
    save_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.

    source
    OAR.save_plotMethod
    save_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.

    source
    OAR.save_simMethod
    save_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.

    source
    OAR.sim_tt_serialMethod
    sim_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.

    source
    OAR.similarityMethod
    similarity(
        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.

    source
    OAR.singleMethod
    single(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.

    source
    OAR.sliding_avgMethod
    sliding_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.

    source
    OAR.symbolic_cluster_datasetMethod
    symbolic_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.

    source
    OAR.symbolic_datasetFunction
    symbolic_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.

    source
    OAR.symbolic_irisMethod
    symbolic_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.

    source
    OAR.symbolic_lung_cancerFunction
    symbolic_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.

    source
    OAR.symbolic_mushroomFunction
    symbolic_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.

    source
    OAR.symbolic_wineMethod
    symbolic_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.

    source
    OAR.tc_startMethod
    tc_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 type Union{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.

    source
    OAR.tt_gramartMethod
    tt_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.

    source
    OAR.tt_serialMethod
    tt_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.

    source
    OAR.vector_to_treeMethod
    vector_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 a OAR.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.

    source
    OAR.weightedMethod
    weighted(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.

    source

    Types

    OAR.ARTNodeType
    abstract type ARTNode

    Summary

    Definition of the ARTNode supertype.

    Fields

    source
    OAR.CFGType
    struct 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).
    source
    OAR.CFGMethod

    Empty constructor for a Context-Free Grammar.

    source
    OAR.CFGMethod

    Constructor for a Context-Free Grammer with an initial statement of non-terminal symbols.

    Arguments

    • N::Statement: an initial set of non-terminal grammar symbols.
    source
    OAR.CMTSTARTTreeType
    struct CMTSTARTTree <: Lerche.Transformer

    Summary

    The CMT grammar tree subtypes from a Lerche Transformer.

    Fields

    source
    OAR.ConfigDictType

    ConfigDict

    Description

    Definition of a configuration dictionary loaded from a config file.

    source
    OAR.DataSplitType
    struct 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,)
    source
    OAR.DataSplitGenericType
    struct 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,)
    source
    OAR.DistributedSTARTType
    abstract type DistributedSTART <: OAR.AbstractSTART

    Summary

    Abstract type for all START-type modules.

    Fields

    source
    OAR.GrammarType
    abstract type Grammar{T}

    Summary

    Abstract type for formal grammars.

    Fields

    source
    OAR.IRISSTARTTreeType
    struct IRISSTARTTree <: Lerche.Transformer

    Summary

    The IRIS grammar tree subtypes from a Lerche Transformer.

    Fields

    source
    OAR.IRISSymbolType

    IRISSymbol

    Description

    Type alias stating that a symbolic IRIS dataset symbol is a string

    source
    OAR.KGSTARTTreeType
    struct KGSTARTTree <: Lerche.Transformer

    Summary

    The KG grammar tree subtypes from a Lerche Transformer.

    Fields

    source
    OAR.KGStatementType

    KGStatement

    Description

    Alias stating that KG statements are vectors of KG grammar symbols (KGStatement = Vector{[KGSymbol](@ref)}`).

    source
    OAR.KGSymbolType

    KGSymbol

    Description

    Alias stating that a KG grammar symbol is a string (KGSymbol =GSymbol{String}).

    source
    OAR.ProtoNodeStatsType
    mutable 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.
    source
    OAR.SingleSTARTType
    abstract type SingleSTART <: OAR.AbstractSTART

    Summary

    Abstract type for all START-type modules.

    Fields

    source
    OAR.StatementsType

    Statements

    Description

    Type alias (Statements{T} = Vector{Statement{T}}), statements are a vector of the statement type.

    source
    OAR.SymbolSetType

    SymbolSet

    Description

    Type alias (SymbolSet{T} = Set{OAR.GSymbol{T}}), a set of grammar symbols is implemented as a Julia set.

    source
    OAR.TTDatasetType
    abstract type TTDataset

    Summary

    Abstract supertype for train/test split datasets

    Fields

    source
    OAR.TerminalDistType

    TerminalDist

    Description

    Terminal Distribution definition that is a dictionary mapping from terminal symbols to probabilities (TerminalDist = Dict{STARTSymbol, Float}).

    source
    OAR.VectoredDataSplitType
    struct 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 type T.
    • test_x::Array{Vector{T}, 1} where T: Testing data as a vector of feature vectors of type T.
    • train_y::Vector: Training labels as a vector of type M.
    • test_y::Vector: Testing labels as a vector of type M.
    source
    OAR.VectoredDatasetType
    abstract type VectoredDataset <: OAR.TTDataset

    Summary

    Abstract supertype for datasets that have vectored elements.

    Fields

    source
    OAR.opts_DDVSTARTType
    mutable 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.7

    • rho_ub::Float64: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.85

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

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

    • gamma::Float64: Pseudo kernel width: gamma >= 1. Default: 3.0

    • gamma_ref::Float64: Reference gamma for normalization: 0 <= gamma_ref < gamma. Default: 1.0

    • similarity::Symbol: Similarity method (activation and match): similarity ∈ [:single, :average, :complete, :median, :weighted, :centroid]. Default: :single

    • epochs::Int64: Maximum number of epochs during training: max_epochs ∈ (1, Inf). Default: 1

    • display::Bool: Display flag for progress bars. Default: false

    • gamma_normalization::Bool: Flag to normalize the threshold by the feature dimension. Default: true

    source
    OAR.opts_DVSTARTType
    mutable 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.55

    • rho_ub::Float64: Upper bound vigilance parameter: rho_ub ∈ [0, 1]. Default: 0.75

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

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

    • epochs::Int64: Maximum number of epochs during training. Default: 1

    • terminated::Bool: Flag for generating nodes at the terminal distributions below their nonterminal positions. Default: false

    source
    OAR.opts_STARTType
    mutable struct opts_START

    Summary

    START options struct as a Parameters.jl @with_kw object.

    Fields

    • rho::Float64: Vigilance parameter: ρ ∈ [0, 1] Default: 0.7

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

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

    • epochs::Int64: Maximum number of epochs during training. Default: 1

    • terminated::Bool: Flag for generating nodes at the terminal distributions below their nonterminal positions. Default: false

    source

    Constants

    OAR.ARG_CFGConstant

    ARG_CFG

    Description

    Common docstring: a CFG grammar argument.

    source
    OAR.ARG_SIM_DConstant

    ARGSIMD

    Description

    Common docstring: argument for the simulation options dictionary.

    source
    OAR.ARG_SIM_OPTSConstant

    ARGSIMOPTS

    Description

    Common docstring: argument for additional simulation options.

    source
    OAR.ARG_SIM_TSConstant

    ARGSIMTS

    Description

    Common docstring: argument for the simulation statements to train upon and cluster.

    source
    OAR.CMT_PHENOTYPESConstant

    CMT_PHENOTYPES

    Description

    A list of the phenotype columns for aggregation into one START feature.

    source
    OAR.COMMON_DOCConstant

    COMMON_DOC

    Description

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

    source
    OAR.DPIConstant

    The default plotting dots-per-inch for saving.

    source
    OAR.DRWATSON_ARGS_DOCConstant

    DRWATSONARGSDOC

    Description

    Common docstring: the arguments to DrWatson-style directory functions.

    source
    OAR.GRAMMAR_SYMB_ARGConstant

    GRAMMARSYMBARG

    Description

    Common docstring for functions using a grammar and a grammar symbol.

    source
    OAR.LINKAGE_METHODSConstant

    LINKAGE_METHODS

    Description

    A list of all distributed dual-vigilance similarity linkage methods.

    source
    OAR.SAVE_MAPConstant

    SAVE_MAP

    Description

    Dictionary mapping the names of result save types to the private wrapper functions that implement them.

    source
    OAR.SomeStatementType

    SomeStatement

    Description

    Alias for arguments accepting multiple definitions of a statement formulation.

    source
    OAR.SomeStatementsType

    SomeStatements

    Description

    Alias for arguments accepting multiple definitions of statement formulations.

    source
    OAR.alphabetConstant

    alphabet

    Description

    Vector of alphabetical letters as Strings for discretized feature labels.

    source