SYMBOL INDEX (86 symbols across 6 files) FILE: kge/dataloader.py class TrainDataset (line 12) | class TrainDataset(Dataset): method __init__ (line 13) | def __init__(self, triples, nentity, nrelation, negative_sample_size, ... method __len__ (line 24) | def __len__(self): method __getitem__ (line 27) | def __getitem__(self, idx): method collate_fn (line 69) | def collate_fn(data): method count_frequency (line 77) | def count_frequency(triples, start=4): method get_true_head_and_tail (line 96) | def get_true_head_and_tail(triples): class TestDataset (line 121) | class TestDataset(Dataset): method __init__ (line 122) | def __init__(self, triples, all_true_triples, nentity, nrelation, mode): method __len__ (line 130) | def __len__(self): method __getitem__ (line 133) | def __getitem__(self, idx): method collate_fn (line 156) | def collate_fn(data): class BidirectionalOneShotIterator (line 163) | class BidirectionalOneShotIterator(object): method __init__ (line 164) | def __init__(self, dataloader_head, dataloader_tail): method __next__ (line 169) | def __next__(self): method one_shot_iterator (line 178) | def one_shot_iterator(dataloader): FILE: kge/model.py class KGEModel (line 21) | class KGEModel(nn.Module): method __init__ (line 22) | def __init__(self, model_name, nentity, nrelation, hidden_dim, gamma, method forward (line 71) | def forward(self, sample, mode='single'): method TransE (line 165) | def TransE(self, head, relation, tail, mode): method DistMult (line 174) | def DistMult(self, head, relation, tail, mode): method ComplEx (line 183) | def ComplEx(self, head, relation, tail, mode): method RotatE (line 200) | def RotatE(self, head, relation, tail, mode): method pRotatE (line 230) | def pRotatE(self, head, relation, tail, mode): method train_step (line 251) | def train_step(model, optimizer, train_iterator, args): method test_step (line 314) | def test_step(model, test_triples, all_true_triples, args): method infer_step (line 461) | def infer_step(model, infer_triples, args): FILE: kge/run.py function parse_args (line 23) | def parse_args(args=None): function override_config (line 77) | def override_config(args): function save_model (line 94) | def save_model(model, optimizer, save_variable_list, args): function read_triple (line 123) | def read_triple(file_path, entity2id, relation2id): function set_logger (line 134) | def set_logger(args): function log_metrics (line 157) | def log_metrics(mode, step, metrics): function ensure_dir (line 164) | def ensure_dir(d): function main (line 168) | def main(args): FILE: mln/mln.cpp function sigmoid (line 17) | double sigmoid(double x) function inv_sigmoid (line 22) | double inv_sigmoid(double x) function min (line 27) | int min(int a, int b) type Triplet (line 33) | struct Triplet method Triplet (line 41) | Triplet() method init (line 58) | void init() type Pair (line 82) | struct Pair type Rule (line 87) | struct Rule method Rule (line 94) | Rule() function print_rule (line 137) | void print_rule(Rule rule) function print_triplet (line 144) | void print_triplet(Triplet triplet) function read_data (line 156) | void read_data() function check_observed (line 220) | bool check_observed(Triplet triplet) function search_composition_rules (line 226) | void search_composition_rules(int h, int r, int t) function search_symmetric_rules (line 254) | void search_symmetric_rules(int h, int r, int t) function search_inverse_rules (line 274) | void search_inverse_rules(int h, int r, int t) function search_subrelation_rules (line 295) | void search_subrelation_rules(int h, int r, int t) function search_candidate_rules (line 316) | void search_candidate_rules() function precision_composition_rule (line 344) | double precision_composition_rule(Rule rule) function precision_symmetric_rule (line 378) | double precision_symmetric_rule(Rule rule) function precision_inverse_rule (line 402) | double precision_inverse_rule(Rule rule) function precision_subrelation_rule (line 426) | double precision_subrelation_rule(Rule rule) function compute_rule_precision (line 477) | void compute_rule_precision() function search_hidden_with_composition (line 497) | void search_hidden_with_composition(int id, int thread) function search_hidden_with_symmetric (line 531) | void search_hidden_with_symmetric(int id, int thread) function search_hidden_with_inverse (line 555) | void search_hidden_with_inverse(int id, int thread) function search_hidden_with_subrelation (line 579) | void search_hidden_with_subrelation(int id, int thread) function search_hidden_triplets (line 628) | void search_hidden_triplets() function read_probability_of_hidden_triplets (line 646) | void read_probability_of_hidden_triplets() function link_composition_rule (line 741) | void link_composition_rule(int id) function link_symmetric_rule (line 775) | void link_symmetric_rule(int id) function link_inverse_rule (line 799) | void link_inverse_rule(int id) function link_subrelation_rule (line 823) | void link_subrelation_rule(int id) function link_rules (line 872) | void link_rules() function init_weight (line 884) | void init_weight() function train_epoch (line 890) | double train_epoch(double lr) function output_rules (line 924) | void output_rules() function output_predictions (line 942) | void output_predictions() function output_hidden_triplets (line 961) | void output_hidden_triplets() function save (line 979) | void save() function load (line 1018) | void load() function train (line 1113) | void train() function ArgPos (line 1151) | int ArgPos(char *str, int argc, char **argv) function main (line 1166) | int main(int argc, char **argv) FILE: run.py function ensure_dir (line 86) | def ensure_dir(d): function cmd_kge (line 90) | def cmd_kge(workspace_path, model): function cmd_mln (line 100) | def cmd_mln(main_path, workspace_path=None, preprocessing=False): function save_cmd (line 106) | def save_cmd(save_path): FILE: utils.py function mln_triplet_prob (line 5) | def mln_triplet_prob(h, r, t, hrt2p): function evaluate (line 19) | def evaluate(mln_pred_file, kge_pred_file, output_file, weight): function augment_triplet (line 110) | def augment_triplet(pred_file, trip_file, out_file, threshold):