MCPcopy Create free account

hub / github.com/DrugLT/ImDrug / functions

Functions316 in github.com/DrugLT/ImDrug

↓ 1 callersFunctionlabel_transform
label transformation helper function Args: y (list): a list of labels binary (bool): whether or not to conduct binarization threshol
lib/utils/label.py:33
↓ 1 callersFunctionlog_to_json
convert .log file to configs in .json
script/test_all.py:21
↓ 1 callersFunctionmpnn_collate_helper
(elems, key, entity_type)
lib/dataset/base_dataset.py:102
↓ 1 callersFunctionmpnn_feature_collate_func
(x)
lib/dataset/base_dataset.py:126
↓ 1 callersFunctionmulti_dataset_load
a wrapper to download, process and load multiple(>2)-instance prediction task datasets. assume the downloaded file is already processed Args:
lib/utils/load.py:335
↓ 1 callersMethodplot_confusion_matrix
(self, normalize = False, cmap=plt.cm.Blues)
lib/core/evaluate.py:384
↓ 1 callersMethodprint_stats
print the statistics of the dataset
lib/dataset/multi_pred/ddi.py:49
↓ 1 callersFunctionproperty_dataset_load
a wrapper to download, process and load single-instance prediction task datasets Args: name (str): the rough dataset name path (str): the
lib/utils/load.py:242
↓ 1 callersFunctionrelabel
(lbl, cls_labels)
lib/utils/split.py:71
↓ 1 callersFunctionrequest
copied from https://github.com/mcs07/PubChemPy/blob/e3c4f4a9b6120433e5cc3383464c7a79e9b2b86e/pubchempy.py#L238 Construct API request from parameter
lib/utils/query.py:20
↓ 1 callersMethodreset
(self)
lib/core/evaluate.py:330
↓ 1 callersMethodreset
(self)
lib/core/evaluate.py:348
↓ 1 callersMethodreset_parameters
Reinitialize model parameters.
lib/backbone/graph.py:293
↓ 1 callersMethodreset_parameters
Reinitialize model parameters.
lib/backbone/graph.py:420
↓ 1 callersFunctionretrieve_label_name_list
get the set of available labels for query dataset Args: name (str): rough dataset name Returns: list: a list of available labels
lib/utils/retrieve.py:67
↓ 1 callersMethodsample_class_index_by_weight
(self)
lib/dataset/base_dataset.py:329
↓ 1 callersFunctionset_baseline
(exp_params, cfg)
lib/utils/utils.py:292
↓ 1 callersFunctionset_distributed
for distributed training
lib/utils/utils.py:229
↓ 1 callersFunctionset_resume
for resumed training
lib/utils/utils.py:259
↓ 1 callersMethodsmooth
(self, features, labels, epoch)
lib/core/combiner.py:460
↓ 1 callersFunctiontest
()
script/test.py:56
↓ 1 callersFunctiontest_model
( dataLoader, model, cfg, logger, device, **kwargs )
lib/core/function.py:185
↓ 1 callersFunctiontrain
()
script/train.py:49
↓ 1 callersFunctiontrain_model
( trainLoader, model, epoch, epoch_number, optimizer, combiner, criterion, cfg, logger, rank=0, use_ap
lib/core/function.py:23
↓ 1 callersMethodupdate
(self, label, output)
lib/core/evaluate.py:351
↓ 1 callersFunctionvalid_model
( dataLoader, epoch_number, model, cfg, criterion, logger, device, rank, distributed, **kwargs )
lib/core/function.py:104
↓ 1 callersFunctionweighted_focal_l1_loss
(inputs, targets, weights=None, activate='sigmoid', beta=.2, gamma=1)
lib/loss/loss_impl/focal_R.py:46
↓ 1 callersFunctionweighted_focal_mse_loss
(inputs, targets, weights=None, activate='sigmoid', beta=.2, gamma=1)
lib/loss/loss_impl/focal_R.py:36
↓ 1 callersFunctionweighted_huber_loss
(inputs, targets, weights=None, beta=1.)
lib/loss/loss_impl/focal_R.py:57
MethodFDS
(self, model, criterion, data, label, meta, meta_data, meta_label, epoch, training, **kwargs)
lib/core/combiner.py:305
FunctionFloatTensor
(*args, **kwargs)
lib/utils/pytorch.py:107
Method__call__
call the evaluator function on targets and predictions Args: *args: targets, predictions, and other information **kwargs: other auxil
lib/core/evaluate.py:289
Method__getitem__
(self, index)
lib/dataset/base_dataset.py:270
Method__init__
(self, in_feats, out_feats, gnn_norm='none', activation=None, residual=True, batchnorm=True,
lib/backbone/graph.py:41
Method__init__
MLP layers construction Paramters --------- num_layers: int The number of linear layers input_dim: int
lib/backbone/graph.py:203
Method__init__
(self, num_edge_emb_list, emb_dim, batch_norm=True, activation=None)
lib/backbone/graph.py:273
Method__init__
(self, num_node_emb_list, num_edge_emb_list, num_layers=5, emb_dim=300, JK='last', dropout=0.
lib/backbone/graph.py:375
Method__init__
(self, encoding, **config)
lib/backbone/sequence.py:8
Method__init__
(self, encoding, **config)
lib/backbone/sequence.py:87
Method__init__
input_dim (int) output_dim (int) hidden_dims_lst (list, each element is a integer, indicating the hidden size)
lib/backbone/mlp.py:9
Method__init__
( self, optimizer, milestones, gamma=0.1, warmup_factor=1.0 / 3,
lib/utils/lr_scheduler.py:5
Method__init__
(self, *args)
lib/dataset/base_dataset.py:31
Method__init__
empty data loader class, to be overwritten
lib/dataset/base_dataset.py:376
Method__init__
Create Protein-Protein Interaction Prediction dataloader object
lib/dataset/multi_pred/ppi.py:32
Method__init__
Create Catalyst Prediction dataloader object
lib/dataset/multi_pred/catalyst.py:32
Method__init__
Create Drug-Drug Interaction (DDI) Prediction dataloader object
lib/dataset/multi_pred/ddi.py:32
Method__init__
Create Reaction Type Prediction dataloader object
lib/dataset/multi_pred/react_type.py:31
Method__init__
Summary Args: name (TYPE): Description path (str, optional): Description label_name (None, option
lib/dataset/multi_pred/test_multi_pred.py:24
Method__init__
Create Yields (Reaction Yields Prediction) dataloader object.
lib/dataset/multi_pred/yields.py:27
Method__init__
create dataloader object Args: name (str): name of dataloader path (str): the path where data is saved label_name (str): name of label
lib/dataset/multi_pred/multi_pred_dataset.py:35
Method__init__
Create a base dataloader object that each multi-instance prediction task dataloader class can inherit from. Args: name
lib/dataset/multi_pred/bi_pred_dataset.py:37
Method__init__
Create Drug-Target Interaction Prediction dataloader object
lib/dataset/multi_pred/dti.py:33
Method__init__
Create ReactType (Reaction Type Prediction) dataloader object.
lib/dataset/single_pred/react_type.py:29
Method__init__
Create a testing case dataloader.
lib/dataset/single_pred/test_single_pred.py:29
Method__init__
Create an Epitope prediction dataloader object.
lib/dataset/single_pred/transposition.py:29
Method__init__
Create a base dataloader object that each single instance prediction task dataloader class can inherit from. Raises: ValueError: for a dataset
lib/dataset/single_pred/single_pred_dataset.py:50
Method__init__
Create Yields (Reaction Yields Prediction) dataloader object.
lib/dataset/single_pred/yields.py:29
Method__init__
Create QM (Quantum Mechanics Modeling) dataloader object.
lib/dataset/single_pred/qm.py:29
Method__init__
Create ADME dataloader object.
lib/dataset/single_pred/adme.py:29
Method__init__
Create a Tox (Toxicity Prediction) dataloader object.
lib/dataset/single_pred/tox.py:29
Method__init__
Create a BioAct dataloader object.
lib/dataset/single_pred/bioact.py:29
Method__init__
(self, num_features, num_classes)
lib/head/classifier.py:29
Method__init__
(self, num_features, num_classes, bias=True)
lib/head/classifier.py:41
Method__init__
(self, cfg, device, num_class_list=None)
lib/core/combiner.py:14
Method__init__
(self, feature_dim, bucket_num=100, bucket_start=3, start_update=0, start_smooth=1, kernel='g
lib/core/combiner.py:360
Method__init__
create an evaluate object
lib/core/evaluate.py:213
Method__init__
(self)
lib/core/evaluate.py:327
Method__init__
(self, num_classes)
lib/core/evaluate.py:344
Method__init__
(self)
lib/neck/pooling_ops.py:21
Method__init__
(self)
lib/neck/pooling_ops.py:28
Method__init__
(self, model, cfg, mode="train", setting_type="LT Classification", entity_type=['drug'], num_c
lib/net/network.py:17
Method__init__
(self, para_dict=None)
lib/loss/loss_base.py:5
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/ldam_loss.py:23
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/balanced_softmax_cross_entropy_loss.py:22
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/class_dependent_temperatures_loss.py:19
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/focal_R.py:12
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/kld_loss.py:22
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/balanced_mse_loss.py:12
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/LDS.py:10
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/equalization_loss.py:29
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/class_balanced_loss.py:59
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/cost_sensitive_cross_entropy_loss.py:18
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/cross_entropy_label_smooth_loss.py:17
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/focal_loss.py:12
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/cross_entropy_label_aware_smooth_loss.py:19
Method__init__
(self, para_dict=None)
lib/loss/loss_impl/influence_balanced_loss.py:13
Method__init__
Init function :param mapping: the mapping dict for (param_name->argument_name). :param instance: the target instance to initi
lib/config/argconfig.py:215
Method__len__
(self)
lib/dataset/base_dataset.py:267
Method__len__
get number of data points Returns: int: number of data points
lib/dataset/base_dataset.py:477
Method__repr__
(self)
lib/config/argconfig.py:41
Method__repr__
__repr__function :return:
lib/config/argconfig.py:248
Method_parse_config
It is a config helper to parser for get_config. Gather values form config and params. Should be written by designer and used by user
lib/config/argconfig.py:79
Methodadd_argument
The same as Config.add_argument but add argument check whether the argument name is in the list of class :param parser: The parser to
lib/config/argconfig.py:302
Functionavg_auc
(y_true, y_pred)
lib/core/evaluate.py:28
Functionbalanced_accuracy_score
(y_true, y_pred, sample_weight=None, per_class=False)
lib/core/evaluate.py:88
Methodbbn_mix
r""" Reference: Zhou et al. BBN: Bilateral-Branch Network with Cumulative Learning for Long-Tailed Visual Recognition, CVPR 2020.
lib/core/combiner.py:250
Functionbinarize
binarization of a label list given a pre-specified threshold Args: y (list): a list of labels threshold (float): the threshold for turnin
lib/utils/label.py:93
Methodbinarize
binarize the labels Args: threshold (float, optional): the threshold to binarize the label. order (str, opti
lib/dataset/base_dataset.py:444
Functioncid2smiles
SMILES string from PubChem CID Args: cid (str): PubChem CID Returns: str: SMILES string
lib/utils/query.py:73
Functionconvert_back_log
conversion from log-scale helper Args: y (list): a list of labels in log-scale Returns: np.array: an array of nM->p labels
lib/utils/label.py:81
← previousnext →101–200 of 316, ranked by callers