MCPcopy Create free account

hub / github.com/SymposiumOrganization/NeuralSymbolicRegressionThatScales / functions

Functions173 in github.com/SymposiumOrganization/NeuralSymbolicRegressionThatScales

↓ 7 callersFunctionload_metadata_hdf5
(path_folder: Path)
src/nesymres/utils.py:68
↓ 5 callersFunctionget_data
iid_ood_mode: if set to "iid", sample uniformly from the support as given by supp; if set to "ood", sample from a larger suppor
src/nesymres/benchmark.py:81
↓ 5 callersMethodsympy_to_prefix
Convert a SymPy expression to a prefix one.
src/nesymres/dataset/generator.py:614
↓ 4 callersMethodadd
Add a new hypothesis to the list.
src/nesymres/architectures/beam_search.py:202
↓ 4 callersFunctionevaluate_model
model_predict is a callable that takes an X of shape (n_datapoints, n_variables) and returns scalar predictions
scripts/benchmark/collect_results.py:152
↓ 4 callersMethodinfix_to_sympy
Convert an infix expression to SymPy.
src/nesymres/dataset/generator.py:567
↓ 4 callersFunctionload_eq
(path_folder, idx, num_eqs_per_set)
src/nesymres/utils.py:59
↓ 4 callersMethodprefix_to_infix
Prefix to infix conversion.
src/nesymres/dataset/generator.py:534
↓ 4 callersFunctionremove_root_constant_terms
Remove root constant terms from a non-constant SymPy expression.
src/nesymres/dataset/sympy_utils.py:104
↓ 3 callersMethod__init__
(self, dim_Q, dim_K, dim_V, num_heads, ln=False)
src/nesymres/architectures/set_transformer.py:7
↓ 3 callersFunctioncreate_env
(path)
src/nesymres/utils.py:75
↓ 3 callersMethodcreate_lambda
(self, i)
scripts/data_creation/dataset_creation.py:87
↓ 3 callersFunctionsample_symbolic_constants
Given an equation, returns randomly sampled constants and dummy contants Args: eq: an Equation. cfg: Used for specifying how many and
src/nesymres/dataset/data_utils.py:120
↓ 2 callersFunction_get_acc_key
(iid_ood_mode,cfg)
scripts/benchmark/collect_results.py:206
↓ 2 callersMethod_prefix_to_infix
Parse an expression in prefix mode, and output it in either: - infix mode (returns human readable string) - develop mode
src/nesymres/dataset/generator.py:491
↓ 2 callersFunctionadd_additive_constants
(expr, placeholders, unary_operators=[])
src/nesymres/dataset/sympy_utils.py:235
↓ 2 callersFunctionadd_multiplicative_constants
Traverse the tree in post-order fashion and add multiplicative placeholders
src/nesymres/dataset/sympy_utils.py:215
↓ 2 callersMethodcompute_loss
(self,output, trg)
src/nesymres/architectures/model.py:106
↓ 2 callersFunctioncount_occurrences2
Count atom occurrences in an expression.
src/nesymres/dataset/sympy_utils.py:48
↓ 2 callersFunctioncreate_df
(path,metadata,cfg, constats_on = False)
scripts/csv_handling/dataload_format_to_csv.py:28
↓ 2 callersMethodcreate_single_hd5_from_eqs
(self,block)
src/nesymres/utils.py:27
↓ 2 callersFunctioncreate_uniform_support
(sampling_distribution, n_variables, p)
src/nesymres/dataset/data_utils.py:19
↓ 2 callersFunctionevaluate_fun
Single input algorithm as this function is used in multiprocessing
src/nesymres/dataset/data_utils.py:85
↓ 2 callersFunctionevaluate_func
(func_str, vars_list, X)
src/nesymres/benchmark.py:187
↓ 2 callersMethodforward
(self,batch)
src/nesymres/architectures/model.py:78
↓ 2 callersFunctionget_pointwise_acc
(y_true, y_pred, rtol, atol)
scripts/benchmark/collect_results.py:117
↓ 2 callersMethodis_done
If there are enough hypotheses and that none of the hypotheses being generated can become better than the worst one in the heap, then
src/nesymres/architectures/beam_search.py:216
↓ 2 callersMethodmake_trg_mask
(self, trg)
src/nesymres/architectures/model.py:61
↓ 2 callersFunctionreturn_dict_metadata_dummy_constant
(metadata)
src/nesymres/dataset/data_utils.py:106
↓ 2 callersMethodsetup
called one ecah GPU separately - stage defines if we are at fit or test step
src/nesymres/architectures/data.py:253
↓ 1 callersMethod_generate_expr
Create a tree with exactly `nb_total_ops` operators.
src/nesymres/dataset/generator.py:328
↓ 1 callersFunction_simplify
(f)
src/nesymres/dataset/sympy_utils.py:12
↓ 1 callersMethod_sympy_to_prefix
Parse a SymPy expression given an initial root operator.
src/nesymres/dataset/generator.py:582
↓ 1 callersMethodadd_identifier_constants
(cls, expr_list)
src/nesymres/dataset/generator.py:466
↓ 1 callersFunctioncollect_results
(cfg)
scripts/benchmark/collect_results.py:65
↓ 1 callersFunctionconstants_to_placeholder
(s,symbol="c")
src/nesymres/architectures/data.py:103
↓ 1 callersMethodconvert_lambda
(self, i, variables, support)
src/nesymres/dataset/convert_csv_to_dataload_format.py:64
↓ 1 callersMethodconvert_lambda
(self, i, variables, support)
scripts/csv_handling/convert_csv_to_dataload_format.py:64
↓ 1 callersFunctionconverter
(folder_csv)
src/nesymres/dataset/convert_csv_to_dataload_format.py:76
↓ 1 callersFunctionconverter
(cfg)
scripts/csv_handling/dataload_format_to_csv.py:51
↓ 1 callersFunctionconverter
(folder_csv)
scripts/csv_handling/convert_csv_to_dataload_format.py:76
↓ 1 callersFunctioncount_occurrences
Count atom occurrences in an expression.
src/nesymres/dataset/sympy_utils.py:29
↓ 1 callersFunctioncreate_hdf_files
(metadata, keep_true, base_path: Path, target_path: Path, debug)
scripts/data_creation/apply_filtering.py:13
↓ 1 callersMethodcreate_sinusoidal_embeddings
(self, n_pos, dim, out)
src/nesymres/architectures/model.py:45
↓ 1 callersFunctioncreator
(number_of_equations,eq_per_block, debug)
scripts/data_creation/dataset_creation.py:119
↓ 1 callersFunctionevaluate_and_wrap
(eqs: List[Equation], cfg)
src/nesymres/architectures/data.py:179
↓ 1 callersFunctionevaluate_equation
Evaluate equation `pred_equation` given as a string.
scripts/benchmark/collect_results.py:123
↓ 1 callersFunctionevaluate_validation_set
(validation_eqs: pd.DataFrame, support)
scripts/data_creation/filter_from_already_existing.py:21
↓ 1 callersFunctionevaluate_validation_set
(validation_eqs: pd.DataFrame, support)
scripts/data_creation/test_presence.py:18
↓ 1 callersFunctionextract_non_constant_subtree
Extract a non-constant sub-tree from an equation.
src/nesymres/dataset/sympy_utils.py:150
↓ 1 callersMethodfloat2bit
(self, f, num_e_bits=5, num_m_bits=10, bias=127., dtype=torch.float32)
src/nesymres/architectures/set_encoder.py:29
↓ 1 callersMethodgenerate_bin_dist
`max_ops`: maximum number of operators Enumerate the number of possible binary trees that can be generated from empty nodes.
src/nesymres/dataset/generator.py:239
↓ 1 callersMethodgenerate_equation
Generate pairs of (function, primitive). Start by generating a random function f, and use SymPy to compute F.
src/nesymres/dataset/generator.py:659
↓ 1 callersMethodgenerate_ubi_dist
`max_ops`: maximum number of operators Enumerate the number of possible unary-binary trees that can be generated from empty nodes.
src/nesymres/dataset/generator.py:268
↓ 1 callersMethodget_equation
(self,)
src/nesymres/architectures/model.py:322
↓ 1 callersMethodget_leaf
(self, curr_leaves, rng)
src/nesymres/dataset/generator.py:321
↓ 1 callersFunctionget_model
(cfg)
scripts/benchmark/fit.py:44
↓ 1 callersFunctionget_nesymres
(cfg)
scripts/benchmark/fit.py:12
↓ 1 callersFunctionget_robust_data
(eq: Equation,mode, cfg)
src/nesymres/benchmark.py:120
↓ 1 callersFunctionget_variables
Parse all free variables in equations and return them in lexicographic order
src/nesymres/benchmark.py:162
↓ 1 callersMethodinteger2bit
(self,integer, num_bits=8)
src/nesymres/architectures/set_encoder.py:52
↓ 1 callersFunctionload_data
(benchmark_name)
src/nesymres/benchmark.py:154
↓ 1 callersFunctionload_eq_raw
(path_folder, idx, num_eqs_per_set)
src/nesymres/utils.py:51
↓ 1 callersFunctionmain
(cfg)
scripts/train.py:24
↓ 1 callersFunctionmain
(cfg)
scripts/fitfunc.py:22
↓ 1 callersFunctionmain
(data_path)
scripts/csv_handling/csv_compliant.py:7
↓ 1 callersFunctionmain
(data_path,debug)
scripts/data_creation/apply_filtering.py:44
↓ 1 callersFunctionmain
(data_path,csv_path,debug)
scripts/data_creation/filter_from_already_existing.py:99
↓ 1 callersFunctionmain
(data_path,csv_path,debug)
scripts/data_creation/test_presence.py:100
↓ 1 callersFunctionmain
(cfg)
scripts/benchmark/fit.py:93
↓ 1 callersFunctionmain
(cfg)
scripts/benchmark/collect_results.py:61
↓ 1 callersFunctionmodel_predict
(X)
scripts/benchmark/fit.py:66
↓ 1 callersFunctionmodel_predict
(X)
scripts/benchmark/collect_results.py:126
↓ 1 callersFunctionnumber_of_support_points
(p, type_of_sampling_points)
src/nesymres/architectures/data.py:138
↓ 1 callersMethodprocess_equation
(self, infix)
src/nesymres/dataset/generator.py:639
↓ 1 callersFunctionreduce_coefficients
Reduce coefficients in an expression. `sqrt(x)*y*sqrt(1/a0)` -> `a0*sqrt(x)*y` `x**(-cos(a0))*y**cos(a0)` -> `x**(-a0)*y**a0`
src/nesymres/dataset/sympy_utils.py:265
↓ 1 callersMethodremainder2bit
(self, remainder, num_bits=127)
src/nesymres/architectures/set_encoder.py:45
↓ 1 callersFunctionremove_root_constant_terms_t
Remove root constant terms from a non-constant SymPy expression.
src/nesymres/dataset/sympy_utils.py:59
↓ 1 callersMethodreturn_constants
(self,expr_list)
src/nesymres/dataset/generator.py:479
↓ 1 callersMethodreturn_local_dict
(cls, variables=None)
src/nesymres/dataset/generator.py:217
↓ 1 callersFunctionreturn_order_variables
(var:set)
src/nesymres/benchmark.py:182
↓ 1 callersMethodreturn_rewrite_functions
(cls,params)
src/nesymres/dataset/generator.py:228
↓ 1 callersMethodreturn_training_set
(self, i)
scripts/data_creation/dataset_creation.py:51
↓ 1 callersMethodrewrite_sympy_expr
Rewrite a SymPy expression.
src/nesymres/dataset/generator.py:546
↓ 1 callersFunctionsample_constants
(eq, curr_p, cfg)
src/nesymres/architectures/data.py:162
↓ 1 callersMethodsample_next_pos_ubi
Sample the position of the next node (unary-binary case). Sample a position in {0, ..., `nb_empty` - 1}, along with an arity.
src/nesymres/dataset/generator.py:298
↓ 1 callersFunctionsample_support
(eq, curr_p, cfg)
src/nesymres/architectures/data.py:147
↓ 1 callersFunctionsimplify
Simplify an expression.
src/nesymres/dataset/sympy_utils.py:5
↓ 1 callersFunctionsimplify_const_with_coeff
Simplify expressions with constants and coefficients. `sqrt(10) * a0 * x` -> `a0 * x` `sin(a0 + x + 9/7)` -> `sin(a0 + x)` `a0 + x +
src/nesymres/dataset/sympy_utils.py:292
↓ 1 callersFunctionsmallest_with
Return the smallest sub-tree in an expression that contains a given symbol.
src/nesymres/dataset/sympy_utils.py:345
↓ 1 callersFunctiontest_count_occurrences
(infix, ref_counts)
src/nesymres/dataset/sympy_utils.py:449
↓ 1 callersFunctiontest_count_occurrences2
(infix, _counts)
src/nesymres/dataset/sympy_utils.py:459
↓ 1 callersMethodtest_dataloader
returns validation dataloader
src/nesymres/architectures/data.py:303
↓ 1 callersFunctiontest_extract_non_constant_subtree
(infix, ref_output)
src/nesymres/dataset/sympy_utils.py:532
↓ 1 callersFunctiontest_reduce_coefficients
(infix, ref_output)
src/nesymres/dataset/sympy_utils.py:567
↓ 1 callersFunctiontest_remove_root_constant_terms
(infix, ref_output, mode, variables)
src/nesymres/dataset/sympy_utils.py:484
↓ 1 callersFunctiontest_simplify_const_with_coeff
(infix, ref_output, coeff)
src/nesymres/dataset/sympy_utils.py:604
↓ 1 callersFunctiontokenize
(prefix_expr:list, word2id:dict)
src/nesymres/architectures/data.py:113
↓ 1 callersFunctiontokens_padding
(tokens)
src/nesymres/architectures/data.py:130
↓ 1 callersMethodwrite_infix
Infix representation. Convert prefix expressions to a format that SymPy can parse.
src/nesymres/dataset/generator.py:389
next →1–100 of 173, ranked by callers