MCPcopy Create free account

hub / github.com/DrugLT/ImDrug / functions

Functions316 in github.com/DrugLT/ImDrug

↓ 80 callersMethodto
(self, device=None)
lib/net/network.py:98
↓ 22 callersFunctionprint_sys
system print Args: s (str): the string to print
lib/utils/misc.py:103
↓ 17 callersFunctionget_label_weight
(df, label_weight_name='Y_Weight')
lib/utils/split.py:66
↓ 13 callersFunctionaccuracy
(y_true, y_pred)
lib/core/evaluate.py:22
↓ 10 callersFunctioncreate_fold_setting_cold_byclass
create cold-split where given one or multiple columns, it first splits based on entities in the columns and then maps all associated data points to t
lib/utils/split.py:159
↓ 9 callersFunctioncreate_standard_fold
create standard split: imbalanced training dataset and balanced validation and testing dataset Args: df (pd.DataFrame): dataset dataframe
lib/utils/split.py:518
↓ 9 callersFunctionfuzzy_search
fuzzy matching between the real dataset name and the input name Args: name (str): input dataset name given by users dataset_names (str):
lib/utils/misc.py:11
↓ 9 callersFunctionget_cls_labels
(df, label_name, num_class, label_type, scale)
lib/utils/split.py:13
↓ 8 callersFunctionget_lt_labels
(cls_labels, lt_frac)
lib/utils/split.py:43
↓ 8 callersMethodload
(self)
lib/dataset/base_dataset.py:227
↓ 8 callersMethodprint_stats
Print basic data statistics.
lib/dataset/single_pred/single_pred_dataset.py:188
↓ 6 callersMethodadd_argument
It is a helper for get_parser. It calls argparse.ArgumentParser().add_argument. If the argument (custom parser name) already in parse
lib/config/argconfig.py:113
↓ 6 callersFunctioncreate_fold_byclass
create random split class by class Args: df (pd.DataFrame): dataset dataframe fold_seed (int): the random seed frac (list): a list o
lib/utils/split.py:112
↓ 6 callersFunctioncreate_fold_time_byclass
create splits based on time, class by class Args: df (pd.DataFrame): the dataset dataframe frac (list): list of train/valid/test fraction
lib/utils/split.py:430
↓ 6 callersMethodprint_stats
print the statistics of the dataset
lib/dataset/multi_pred/ppi.py:49
↓ 6 callersMethodreset_parameters
Reinitialize model parameters.
lib/backbone/graph.py:162
↓ 6 callersMethodupdate
(self, epoch)
lib/core/combiner.py:74
↓ 5 callersFunctioncreate_fold_setting_cold
create cold-split where given one or multiple columns, it first splits based on entities in the columns and then maps all associated data points to t
lib/utils/split.py:585
↓ 5 callersMethodget_data
generate data in some format, e.g., pandas.DataFrame Args: format (str, optional): format of data, the d
lib/dataset/multi_pred/bi_pred_dataset.py:90
↓ 5 callersFunctionpd_load
load a pandas dataframe from local file. Args: name (str): dataset name path (str): the path where the dataset is saved Returns:
lib/utils/load.py:208
↓ 5 callersMethodupdate
(self, val, n=1)
lib/core/evaluate.py:336
↓ 4 callersMethod__init__
(self, in_feats, hidden_feats=None, gnn_norm=None, activation=None, residual=None, batchnorm=
lib/backbone/graph.py:128
↓ 4 callersFunctioncreate_combination_split_by_class
Function for splitting drug combination dataset such that no combinations are shared across the split, class by class Args: df (pd.Dataframe
lib/utils/split.py:355
↓ 4 callersFunctioncreate_fold
create random split Args: df (pd.DataFrame): dataset dataframe fold_seed (int): the random seed frac (list): a list of train/valid/t
lib/utils/split.py:564
↓ 4 callersMethodextract_feature
(self, inputs:list, **kwargs)
lib/net/network.py:135
↓ 4 callersMethodextract_feature_maps
(self, inputs: list, **kwargs)
lib/net/network.py:145
↓ 3 callersFunctioncalibrate_mean_var
(matrix, m1, v1, m2, v2, clip_min=0.1, clip_max=10)
lib/core/combiner.py:345
↓ 3 callersFunctionconvert_y_unit
label unit conversion helper function Args: y (list): a list of labels from_ (str): source units, 'nM'/'p' to_ (str): target units,
lib/utils/label.py:10
↓ 3 callersFunctioncreate_open_split_byclass
split whole dataset into closed set and open set (for testing only), class by class Args: frac (float): fraction of number of open classes Retur
lib/utils/split.py:75
↓ 3 callersFunctiondownload_wrapper
wrapper for downloading a dataset given the name and path, for csv,pkl,tsv files Args: name (str): the rough dataset query name path (str
lib/utils/load.py:24
↓ 3 callersMethodget_data
Arguments: format (str, optional): the dataset format Returns: pd.DataFrame/dict/np.array: w
lib/dataset/base_dataset.py:381
↓ 3 callersFunctioninstall
install pip package Args: package (str): package name
lib/utils/misc.py:95
↓ 3 callersMethodload_model
(self, model_file, map_location=None)
lib/net/network.py:132
↓ 3 callersMethodupdate
Adopt cost-sensitive cross-entropy as the default Args: epoch: int. starting from 1.
lib/loss/loss_base.py:49
↓ 2 callersMethod__init__
(self, encoding, **config)
lib/backbone/sequence.py:40
↓ 2 callersMethod__init__
input_dim (int) output_dim (int) hidden_dims_lst (list, each element is a integer, indicating the hidden size)
lib/head/classifier.py:6
↓ 2 callersMethod__init__
(self)
lib/neck/pooling_ops.py:11
↓ 2 callersMethod_add_kwargs
Get kwargs from the config. Use for designer but is not available for user. :param config: the parse_args() results :
lib/config/argconfig.py:178
↓ 2 callersMethod_forward_features
(self, x)
lib/backbone/sequence.py:73
↓ 2 callersMethod_get_conv_output
(self, shape)
lib/backbone/sequence.py:66
↓ 2 callersMethod_get_conv_output
(self, shape)
lib/backbone/sequence.py:151
↓ 2 callersFunctioncreate_combination_split
Function for splitting drug combination dataset such that no combinations are shared across the split Args: df (pd.Dataframe): dataset to sp
lib/utils/split.py:739
↓ 2 callersFunctioncreate_fold_time
create splits based on time Args: df (pd.DataFrame): the dataset dataframe frac (list): list of train/valid/test fractions date_colu
lib/utils/split.py:791
↓ 2 callersFunctioncreate_logger
(cfg, rank=0, test=False)
lib/utils/utils.py:27
↓ 2 callersFunctioncreate_scaffold_split_byclass
create scaffold split. it first generates molecular scaffold for each molecule and then split based on scaffolds, class by class reference: https://g
lib/utils/split.py:249
↓ 2 callersFunctiondataverse_download
dataverse download helper with progress bar, for ImDrug datasets hosted on Harvard Dataverse Args: url (str): the url of the dataset path
lib/utils/load.py:81
↓ 2 callersFunctiondeep_update_dict
update dict of dicts with new values
lib/utils/utils.py:17
↓ 2 callersFunctionfrom_numpy
(*args, **kwargs)
lib/utils/pytorch.py:111
↓ 2 callersFunctionget_balanced_dataset
(df, lt_frac, label_name='Y', label_weight_name='Y_Weight', lt_label_name='LT_Class', num_class=10, label_type
lib/utils/split.py:497
↓ 2 callersFunctionget_category_list
(dataset: torch.utils.data.Dataset)
lib/utils/utils.py:220
↓ 2 callersFunctionget_dataset
(cfg, test=False)
lib/utils/utils.py:163
↓ 2 callersFunctionget_model
(cfg, device, logger, entity_type: list)
lib/utils/utils.py:125
↓ 2 callersFunctionmove_to_device
(obj, device=None)
lib/utils/pytorch.py:94
↓ 2 callersFunctionreduce_tensor
(tensor, world_size)
lib/core/function.py:98
↓ 1 callersFunctionNegSample
Negative Sampling for Binary Interaction Dataset Args: df (pandas.DataFrame): input dataset dataframe column_names (list): column names i
lib/utils/label.py:154
↓ 1 callersMethod__init__
(self, cfg, entities: List[str], entity_type: List[str], data_df: pd.DataFrame,
lib/dataset/base_dataset.py:154
↓ 1 callersMethod__init__
(self, para_dict=None)
lib/loss/loss_base.py:36
↓ 1 callersMethod__init__
(self, para_dict= None)
lib/loss/loss_impl/class_balanced_loss.py:24
↓ 1 callersMethod__init__
Initialize config Should be written by designer and used by user :param mapping: Dict. The mapping for parser (param name -->
lib/config/argconfig.py:22
↓ 1 callersMethod_add_args
Get args from the config. Use for designer but is not available for user. :param config: the parse_args() results :pa
lib/config/argconfig.py:154
↓ 1 callersMethod_forward_features
(self, x)
lib/backbone/sequence.py:158
↓ 1 callersMethod_get_backbone
(self)
lib/net/network.py:167
↓ 1 callersMethod_get_class_dict
(self)
lib/dataset/base_dataset.py:315
↓ 1 callersMethod_get_head
(self)
lib/net/network.py:187
↓ 1 callersMethod_get_kernel_window
(kernel, ks, sigma)
lib/core/combiner.py:383
↓ 1 callersMethod_get_neck
(self)
lib/net/network.py:174
↓ 1 callersMethod_parse_config
The simple version of _parse_config. For internal use only. :param config: the target args generated by parse_args. :param ar
lib/config/argconfig.py:262
↓ 1 callersFunction_parse_prop
Extract property value from record using the given urn search filter.
lib/utils/query.py:13
↓ 1 callersMethod_update_last_epoch_stats
(self)
lib/core/combiner.py:399
↓ 1 callersFunctionadd_path
Add path to PYTHONPATH environment variable for relative import
script/_init_paths.py:5
↓ 1 callersMethodassign_evaluator
obtain evaluator function given the evaluator name
lib/core/evaluate.py:219
↓ 1 callersFunctionbalanced_f1
Assuming i.i.d of the samples in each class, to compensate for the effect of imbalanced distribution on f1 score, we calculate precision based on f
lib/core/evaluate.py:142
↓ 1 callersFunctioncreate_scaffold_split
create scaffold split. it first generates molecular scaffold for each molecule and then split based on scaffolds reference: https://github.com/chempr
lib/utils/split.py:651
↓ 1 callersFunctiondefault_collate_helper
(elems, key, entity_type)
lib/dataset/base_dataset.py:86
↓ 1 callersFunctiondgl_collate_helper
(elems, key, entity_type)
lib/dataset/base_dataset.py:67
↓ 1 callersFunctionelem_or_tuple_to_variable
(elem_or_tuple)
lib/utils/pytorch.py:45
↓ 1 callersMethodfeaturize
(self)
lib/dataset/base_dataset.py:243
↓ 1 callersFunctionfilter_batch
(np_batch)
lib/utils/pytorch.py:53
↓ 1 callersMethodforward
(self, model, criterion, data, label, meta, meta_data, meta_label, lds_weight=None, epoch=None, training=False
lib/core/combiner.py:77
↓ 1 callersMethodfreeze_backbone
(self)
lib/net/network.py:105
↓ 1 callersFunctionget_closet_match
Get the closest match by Levenshtein Distance. Args: predefined_tokens (list): Predefined string tokens. test_token (str): User input tha
lib/utils/misc.py:37
↓ 1 callersMethodget_data
generate data in some format, e.g., pandas.DataFrame Args: format (str, optional): format of data, the d
lib/dataset/multi_pred/multi_pred_dataset.py:55
↓ 1 callersMethodget_data
Arguments: format (str, optional): the returning dataset format, defaults to 'df' Returns: pandas DataFrame/dict: a dataframe of a dataset
lib/dataset/single_pred/single_pred_dataset.py:78
↓ 1 callersMethodget_feature_length
(self)
lib/net/network.py:212
↓ 1 callersFunctionget_lds_kernel_window
(kernel, ks, sigma)
lib/dataset/base_dataset.py:139
↓ 1 callersMethodget_lds_weights
(self, reweight, max_target=121, lds_kernel='gaussian', lds_ks=5, lds_sigma=2)
lib/dataset/base_dataset.py:342
↓ 1 callersFunctionget_log
retrieve all .log files from training output
script/test_all.py:10
↓ 1 callersFunctionget_log
(path)
script/get_result.py:27
↓ 1 callersFunctionget_one_hot
(label, num_classes)
lib/loss/utils.py:3
↓ 1 callersFunctionget_optimizer
(cfg, model)
lib/utils/utils.py:67
↓ 1 callersMethodget_parameter_name_set
The function to get the parameter set :param func: The target function. :param except_list: the excepted parameter name.
lib/config/argconfig.py:316
↓ 1 callersFunctionget_params
(log)
script/get_result.py:35
↓ 1 callersMethodget_rec_per_class
(self)
lib/core/evaluate.py:356
↓ 1 callersFunctionget_result
(log)
script/get_result.py:46
↓ 1 callersFunctionget_scheduler
(cfg, optimizer)
lib/utils/utils.py:93
↓ 1 callersMethodget_split
split function, overwritten by single_pred/multi_pred/generation for more specific splits Arguments: method: splitting sc
lib/dataset/base_dataset.py:410
↓ 1 callersMethodget_weight
(self)
lib/dataset/base_dataset.py:322
↓ 1 callersFunctioninit_df
()
script/get_result.py:10
↓ 1 callersMethodinitilize_all_parameters
(self)
lib/core/combiner.py:55
↓ 1 callersFunctioninteraction_dataset_load
a wrapper to download, process and load two-instance prediction task datasets Args: name (str): the rough dataset name path (str): the da
lib/utils/load.py:290
next →1–100 of 316, ranked by callers