MCPcopy Create free account

hub / github.com/HazyResearch/evaporate / functions

Functions201 in github.com/HazyResearch/evaporate

↓ 29 callersMethodjoint_p
(self, C, values)
evaporate/weak_supervision/make_pgm.py:80
↓ 28 callersFunctionto01
(labels)
evaporate/weak_supervision/make_pgm.py:372
↓ 14 callersMethodmake_data
(self, n, has_label = True)
evaporate/weak_supervision/make_pgm.py:180
↓ 12 callersFunctionclean_comparison
(extraction, attribute='', exact_match=False)
evaporate/evaluate_synthetic.py:91
↓ 11 callersMethodexpectation
(self, C)
evaporate/weak_supervision/make_pgm.py:94
↓ 10 callersMethodget_probs
Computes the probability Pr(y | votes) using Bayes Rule over Pr(votes, y). Args: - votes: m element array of votes in {-1, 0, ..., k
evaporate/weak_supervision/methods.py:502
↓ 9 callersMethodnaive_bayes
Naive bayes estimation. Estimate Pr(vote_i | y) from training data and use that to compute Pr(y = 1 | votes). Assumes conditional in
evaporate/weak_supervision/methods.py:521
↓ 7 callersFunctionapply_prompt
(step : Step, max_toks = 50, do_print=False, manifest=None, overwrite_cache=False)
evaporate/utils.py:36
↓ 7 callersMethodmajority_vote
Take a majority vote over predictors. Current implementation ignores abstains. When there is a tie, we pick the prompt with the lowest index.
evaporate/weak_supervision/methods.py:352
↓ 6 callersMethodget_probs
Computes the probability Pr(y = 1 | votes).
evaporate/weak_supervision/make_pgm.py:321
↓ 6 callersMethodpick_best
Use the predictor with the best performance on the train set.
evaporate/weak_supervision/methods.py:344
↓ 5 callersMethod_set_clique_data
Creates a data structure c_data which maps cliques and separator sets to their maximal clique.
evaporate/weak_supervision/methods.py:158
↓ 5 callersMethod_set_clique_tree
Constructs a data structure c_tree that contains nodes and edges of the junction tree. Args: edgeset: List of tuples (i,
evaporate/weak_supervision/methods.py:123
↓ 5 callersMethodflying_squid
FlyingSquid algorithm requires no labeled data (except for estimating class balance). Assumes conditional independence (for now) and symmetr
evaporate/weak_supervision/methods.py:736
↓ 5 callersMethodget_cond_probs
Computes the probability Pr(votes | y).
evaporate/weak_supervision/make_pgm.py:266
↓ 5 callersFunctionget_file_attribute
(attribute)
evaporate/utils.py:63
↓ 5 callersMethodjoint_p
(self, C, values)
evaporate/weak_supervision/pgm.py:56
↓ 4 callersMethodget_clique_probs
Computes marginal probability over voters indexed by idx, Pr(votes_idxs = vals | y).
evaporate/weak_supervision/binary_deps.py:146
↓ 4 callersMethodjunction_tree
Junction tree estimation. Estimate Pr(vote_i | y) from training data and use that to compute Pr(y = 1 | votes). Assumes edgeset stru
evaporate/weak_supervision/methods.py:550
↓ 4 callersFunctionsample_scripts
(files, train_size=5)
evaporate/profiler_utils.py:185
↓ 3 callersFunctionapply_final_profiling_functions
( files2contents, sample_files, fn, attribute, data_lake='', function_cache=False, )
evaporate/profiler.py:247
↓ 3 callersMethoddata_programming
Data programming algorithm. Args: - with_label: Do we use y or not? If using label, use the train set and do MLE on Pr(y, votes);
evaporate/weak_supervision/methods.py:842
↓ 3 callersFunctiondeduplicate_extractions
(extractions)
evaporate/profiler.py:442
↓ 3 callersMethodget_cond_probs
Computes the probability Pr(votes, y) assuming conditional independence. Args: - votes: m element array of votes in {-1, 0, ..., k-1
evaporate/weak_supervision/methods.py:428
↓ 3 callersFunctionget_manifest_session
( client_name="huggingface", client_engine=None, client_connection="http://127.0.0.1:5000", ca
evaporate/utils.py:202
↓ 3 callersFunctionget_model_extractions
( file2chunks, sample_files, attribute, manifest_session, model_name, overwrite_cac
evaporate/profiler.py:454
↓ 3 callersMethodsample
(self)
evaporate/weak_supervision/pgm.py:96
↓ 2 callersMethod_set_clique_data
(self, c_tree)
evaporate/weak_supervision/make_pgm.py:220
↓ 2 callersMethod_set_clique_tree
(self, edges)
evaporate/weak_supervision/make_pgm.py:194
↓ 2 callersFunctionapply_final_ensemble
( group_files, file2chunks, file2contents, selected_keys, all_metrics, attribute,
evaporate/profiler.py:188
↓ 2 callersFunctionclean_comparison
(responses, field)
evaporate/evaluate_profiler.py:7
↓ 2 callersFunctioncombine_extractions
( args, all_extractions, all_metrics, combiner_mode = "mv", attribute=None, train_
evaporate/profiler.py:115
↓ 2 callersFunctioncompute_f1
(precision, recall)
evaporate/evaluate_synthetic.py:24
↓ 2 callersFunctionevaluate
( all_extractions:list, gold_key:str, field:str, manifest_session=None, overwrite_cache
evaporate/evaluate_profiler.py:156
↓ 2 callersMethodevaluate
(self, result)
evaporate/main.py:224
↓ 2 callersMethodevaluate
Using our learned PGM, output rounded estimates of Pr(y = 1 | votes) and computes its accuracy. Args: test_v
evaporate/weak_supervision/binary_deps.py:211
↓ 2 callersMethodget_clique_probs
Computes marginal probability over votes indexed by idx, Pr(votes_idxs = vals | y), using training data.
evaporate/weak_supervision/methods.py:375
↓ 2 callersFunctionget_cond_probs
(votes, y, indices_train, golds_train, accs_train, num_lfs_test)
evaporate/weak_supervision/ws_utils.py:72
↓ 2 callersFunctionget_cond_probs
(m, votes, y, accs, balance)
evaporate/weak_supervision/pgm.py:138
↓ 2 callersMethodget_cond_probs
Computes the probability Pr(votes | y).
evaporate/weak_supervision/binary_deps.py:159
↓ 2 callersFunctionget_embeddings
(sentences)
evaporate/retrieval.py:10
↓ 2 callersFunctionget_function_field_from_attribute
(attribute)
evaporate/profiler.py:350
↓ 2 callersFunctionget_functions
( file2chunks, sample_files, all_extractions, attribute, manifest_session, overwrite_c
evaporate/profiler.py:354
↓ 2 callersFunctionget_gold_metadata
(args)
evaporate/run_profiler.py:100
↓ 2 callersFunctionget_most_similarity
(target_sentence, sentences)
evaporate/retrieval.py:31
↓ 2 callersFunctionget_topk_scripts_per_field
( script2metrics, function_dictionary, all_extractions, gold_key='', k=3, do_end_t
evaporate/evaluate_profiler.py:233
↓ 2 callersFunctionidentify_schema
(run_string, args, file2chunks: Dict, file2contents: Dict, sample_files: List, manifest_sessions: Dict, group_
evaporate/schema_identification.py:234
↓ 2 callersFunctionlearn_structure
(L)
evaporate/weak_supervision/run_ws.py:116
↓ 2 callersFunctionlong_substr
(data)
evaporate/profiler_utils.py:494
↓ 2 callersMethodmake_data
(self, n, has_label = True)
evaporate/weak_supervision/pgm.py:106
↓ 2 callersFunctionnormalize_value_type
(metadata, attribute)
evaporate/evaluate_profiler.py:30
↓ 2 callersFunctionpick_a_gold_label
To counteract the large model hallucinating on various chunks affecting the evaluation of good functions.
evaporate/evaluate_profiler.py:53
↓ 2 callersFunctionprepare_data
(profiler_args, file_group, data_args, parser = "html")
evaporate/run_profiler.py:56
↓ 2 callersFunctionrerank
( field2value, exclude, cleaned_counter, order_of_addition, base_extraction_count, most_in_context_exa
evaporate/schema_identification.py:131
↓ 2 callersFunctionrun_profiler
(run_string, args, file2chunks, file2contents, sample_files, group_files, manifest_sessions, attribute, profil
evaporate/profiler.py:599
↓ 2 callersFunctionrun_ws
( all_votes, gold_extractions_file, symmetric=True, attribute='', has_abstains=1.0,
evaporate/weak_supervision/run_ws.py:174
↓ 2 callersFunctiontext_f1
Compute average F1 of text spans. Taken from Squad without prob threshold for no answer.
evaporate/evaluate_synthetic_utils.py:4
↓ 2 callersFunctiontext_f1
Compute average F1 of text spans. Taken from Squad without prob threshold for no answer.
evaporate/evaluate_profiler.py:81
↓ 2 callersFunctiontime_limit
(seconds)
evaporate/profiler.py:38
↓ 2 callersFunctiontogether_call
(prompt, model, streaming = False, max_tokens = 1024)
evaporate/utils.py:15
↓ 1 callersMethod__init__
(self, train_votes, train_gold, test_votes, test_gold, abstains = False, classes=[0, 1], abstain_value = -1)
evaporate/weak_supervision/methods.py:20
↓ 1 callersMethod_estimate_accs
Computes Pr(vote_i | y) on training data. Each prompt has k x k values. We ignore the abstaining case Pr(vote_i = 0 | y), since this is handl
evaporate/weak_supervision/methods.py:209
↓ 1 callersMethod_estimate_balance
Estimates the class balance Pr(y) on training data. Sets self.balance to be an array of length k.
evaporate/weak_supervision/methods.py:203
↓ 1 callersMethod_estimate_coverage
Computes Pr(vote_i != 0) (coverage) and Pr(vote_i = 0 | y) for each y (abstain_rate).
evaporate/weak_supervision/methods.py:260
↓ 1 callersMethod_estimate_fs_accs
Estimates Pr(vote_i | y = 0, 1) using FlyingSquid algorithm. Args: - on_test: If we use the unlabeled test dataset or the labeled tr
evaporate/weak_supervision/methods.py:275
↓ 1 callersMethod_estimate_symmetric_accs
Computes Pr(vote_i | y) on training data similarly to above, but assumes Pr(vote_i = c | y = c) = Pr(vote_i = y), independent of what the val
evaporate/weak_supervision/methods.py:245
↓ 1 callersMethod_estimate_test_accs
(self)
evaporate/weak_supervision/methods.py:228
↓ 1 callersMethod_exponential_family
(self, labels)
evaporate/weak_supervision/make_pgm.py:61
↓ 1 callersMethod_exponential_family
(self, labels)
evaporate/weak_supervision/pgm.py:34
↓ 1 callersMethod_get_accs
self.accs[k, i, j] = Pr(lf_k = j | y = i) (i, j scaled to -1, 1 if needed)
evaporate/weak_supervision/make_pgm.py:158
↓ 1 callersMethod_get_accs
self.accs[k, i, j] = Pr(lf_k = j | y = i) (i, j scaled to -1, 1 if needed)
evaporate/weak_supervision/pgm.py:84
↓ 1 callersMethod_get_accs_and_cb
(self)
evaporate/weak_supervision/binary_deps.py:134
↓ 1 callersMethod_get_balance
(self)
evaporate/weak_supervision/make_pgm.py:103
↓ 1 callersMethod_get_balance
(self)
evaporate/weak_supervision/pgm.py:79
↓ 1 callersMethod_get_edges_nodes
(self)
evaporate/weak_supervision/make_pgm.py:53
↓ 1 callersMethod_get_means
(self)
evaporate/weak_supervision/make_pgm.py:97
↓ 1 callersMethod_get_means
(self)
evaporate/weak_supervision/pgm.py:73
↓ 1 callersMethod_get_scaled
For binary tasks defined with classes [0, 1] and abstain -1, we construct scaled versions with classes [-1, 1] and abstain 0. Scaled
evaporate/weak_supervision/methods.py:87
↓ 1 callersMethod_get_test_acc
Compute Pr(vote_i = y) on the test data.
evaporate/weak_supervision/methods.py:338
↓ 1 callersMethod_get_train_acc
Compute Pr(vote_i = y) on the training data.
evaporate/weak_supervision/methods.py:330
↓ 1 callersMethod_make_cdf
(self)
evaporate/weak_supervision/make_pgm.py:77
↓ 1 callersMethod_make_cdf
(self)
evaporate/weak_supervision/pgm.py:50
↓ 1 callersMethod_make_pdf
(self)
evaporate/weak_supervision/make_pgm.py:68
↓ 1 callersMethod_make_pdf
(self)
evaporate/weak_supervision/pgm.py:41
↓ 1 callersMethod_set_clique_data
(self)
evaporate/weak_supervision/binary_deps.py:89
↓ 1 callersMethod_set_clique_tree
(self)
evaporate/weak_supervision/binary_deps.py:63
↓ 1 callersFunctioncheck_remove_attribute
( all_extractions, attribute, topic, train_extractions={}, manifest_session=None, o
evaporate/profiler.py:49
↓ 1 callersFunctioncheck_vs_train_extractions
(train_extractions, final_extractions, gold_key, attribute = None)
evaporate/profiler_utils.py:461
↓ 1 callersFunctionchunk_file
( parser, file, chunk_size=5000, mode="train", remove_tables=False, body_only=False )
evaporate/profiler_utils.py:200
↓ 1 callersFunctionchunk_files
(file_group, parser, chunk_size, remove_tables, max_chunks_per_file, body_only)
evaporate/run_profiler.py:36
↓ 1 callersFunctionclean_function_predictions
(extraction, attribute=None)
evaporate/profiler_utils.py:420
↓ 1 callersFunctionclean_html
(content)
evaporate/profiler_utils.py:218
↓ 1 callersMethodcross_entropy
(self, edgeset)
evaporate/weak_supervision/make_pgm.py:334
↓ 1 callersMethodcross_entropy
Computes -1/n sum_i log Pr(y-hat = y, votes_j), minimizing cross entropy over the joint distribution of Y, votes.
evaporate/weak_supervision/methods.py:703
↓ 1 callersMethodcross_entropy_conditional
(self, edgeset)
evaporate/weak_supervision/make_pgm.py:342
↓ 1 callersMethodcross_entropy_conditional
Computes -1/n sum_i log Pr(y-hat = y | votes_j). This is the standard notion of CE loss.
evaporate/weak_supervision/methods.py:688
↓ 1 callersMethodcross_entropy_no_label
(self, edgeset)
evaporate/weak_supervision/make_pgm.py:355
↓ 1 callersMethodcross_entropy_no_label
Computes -1/n sum_j log Pr(votes_j), minimizing cross entropy over the distribution of votes
evaporate/weak_supervision/methods.py:718
↓ 1 callersFunctiondetermine_attribute_slices
(gold_extractions, slice_results)
evaporate/evaluate_synthetic.py:272
↓ 1 callersFunctiondetermine_attributes_to_remove
(attributes, args, run_string, num_attr_to_cascade)
evaporate/run_profiler.py:122
next →1–100 of 201, ranked by callers