MCPcopy Create free account

hub / github.com/deepchem/torchchem / functions

Functions169 in github.com/deepchem/torchchem

Method__init__
Abstract class for all models. Parameters: ----------- model_instance: object Wrapper around ScikitLearn/Keras/Tensorflow model obje
torchchem/models/model.py:18
Method__init__
Constructs the computational graph. This function constructs the computational graph for the model. It relies subclassed methods (build/cost)
torchchem/models/model.py:133
Method_reward
Reward of a state. Returns: Float. QED of the current state.
contrib/MolDQN/agent.py:34
Methodadd_graph
Add a single graph Parameters ---------- g : tg.data.Data Molecular graph
torchchem/data/mol_dataset.py:125
Functionatom_valences
Creates a list of valences corresponding to atom_types. Note that this is not a count of valence electrons, but a count of the maximum number of
contrib/MolDQN/utils.py:47
Methodbuild
Constructs the graph architecture as specified in its config. This method creates the following Placeholders: mol_features: Molecule des
torchchem/models/multitask_classification.py:34
Methodbuild
Constructs the graph architecture as specified in its config. This method creates the following Placeholders: mol_features: Molecule descri
torchchem/models/multitask_regression.py:32
Methodclone
clone() method to trick Theano
torchchem/feat/neural_fp.py:50
Functionconstruct_loader
(x, y, target, batch_size, shuffle=True)
torchchem/models/data_utils.py:401
Functionconstruct_loader_reg
(x, y, target, batch_size, shuffle=True)
torchchem/models/data_utils.py:412
Functioncontains_scaffold
Returns whether mol contains the given scaffold. NOTE: This is more advanced than simply computing scaffold equality (i.e. scaffold(mol_a) == sca
contrib/MolDQN/utils.py:80
Methodcost
(self, logit, label, weight)
torchchem/models/multitask_classification.py:104
Methodcost
(self, logit, label, weight)
torchchem/models/multitask_regression.py:100
Methodcurrent_file
Returns ------- str File path of the next data batch.
torchchem/data/mol_dataset.py:75
Methoddump_as_matrices
(self)
torchchem/feat/neural_fp.py:114
Methoddump_as_tensor
Method to represent attributed graph as a giant tensor The tensor is N_node x N_node x N_attributes. For a given node, A_i,i,: is a vect
torchchem/feat/neural_fp.py:65
Functionearly_stop
Stop the training if there is no non-trivial progress in k steps @param val_acc_history: a list contains all the historical validation acc @par
torchchem/models/utils.py:6
MethodedgeAttributes
Returns 2D array where (#, :) contains attributes of edge #
torchchem/feat/neural_fp.py:40
MethodedgeAttributesAtt
(self)
torchchem/feat/neural_fp.py:44
FunctionfillBondType
(rdmol, bondtype_list)
torchchem/feat/neural_fp.py:579
Methodfit
Fits a model on data in a Dataset object.
torchchem/models/model.py:81
Methodfit
Fit the model. Parameters ---------- dataset: dc.data.Dataset Dataset object holding training data nb_epoch: 10 Number
torchchem/models/model.py:234
Methodfit_on_batch
Updates existing model with new information.
torchchem/models/model.py:48
Methodforward
(self, x)
contrib/ElemNet/model.py:37
Methodforward
(self, output, y, w)
torchchem/models/graphconv.py:544
Methodforward
Take in and process masked src and target sequences.
torchchem/models/transformer.py:75
Methodforward
(self, x, mask)
torchchem/models/transformer.py:115
Methodforward
(self, x, mask)
torchchem/models/transformer.py:139
Methodforward
Pass the input (and mask) through each layer in turn.
torchchem/models/transformer.py:162
Methodforward
(self, x)
torchchem/models/transformer.py:178
Methodforward
(self, x)
torchchem/models/transformer.py:193
Methodforward
Apply residual connection to any sublayer with the same size.
torchchem/models/transformer.py:211
Methodforward
Follow Figure 1 (left) for connections.
torchchem/models/transformer.py:230
Methodforward
(self, x)
torchchem/models/transformer.py:253
Methodforward
Implements Figure 2
torchchem/models/transformer.py:352
Methodforward
TODO: Tutaj mozna jeszcze wrzucic jakas nieliniowosc na koniec, bo gdy N_dense = 1, to mamy zwykle mnozenie macierzy
torchchem/models/transformer.py:429
Methodforward
(self, x)
torchchem/models/transformer.py:454
MethodgetAdjTensor
(self, maxNodes)
torchchem/feat/neural_fp.py:55
Functionget_fingerprint
Get Morgan Fingerprint of a specific SMILES string. Args: smiles: String. The SMILES string of the molecule. hparams: tf.contrib.training.H
contrib/MolDQN/utils.py:23
Methodget_num_tasks
Get number of tasks.
torchchem/models/model.py:124
Methodget_path
(self)
contrib/MolDQN/environment.py:382
Functionget_scaffold
Computes the Bemis-Murcko scaffold for a molecule. Args: mol: RDKit Mol. Returns: String scaffold SMILES.
contrib/MolDQN/utils.py:67
Methodget_task_type
Currently models can only be classifiers or regressors.
torchchem/models/model.py:118
Methodlen
(self)
torchchem/data/mol_dataset.py:163
Functionload_csv_dataset
Load dataset from a csv file Parameters ---------- path : str Path to the csv data file. label_col : list of str Column names for
torchchem/data/data_utils.py:24
Functionload_data_from_df
(dataset_path, target, repeats=1, shuffle_re
torchchem/models/data_utils.py:31
Functionload_sdf_dataset
Load dataset from a csv file Parameters ---------- path : str Path to the sdf data file. label_col : list of str Column names for
torchchem/data/data_utils.py:92
Functionmol_collate_func_class
(batch)
torchchem/models/data_utils.py:328
Functionmol_collate_func_reg
Customized function for DataLoader that dynamically pads the batch so that all data have the same length
torchchem/models/data_utils.py:247
MethodnodeAttributes
Returns 2D array where (#, :) contains attributes of node #
torchchem/feat/neural_fp.py:36
Methodnum_steps_taken
(self)
contrib/MolDQN/environment.py:379
Functionpenalized_logp
Calculates the penalized logP of a molecule. Refactored from https://github.com/wengong-jin/icml18-jtnn/blob/master/bo/run_bo.py See Junction T
contrib/MolDQN/utils.py:119
Methodpredict
(self, dataset, batch_size=32)
torchchem/models/graphconv.py:664
Methodpredict
Uses self to make predictions on provided Dataset object. Returns: y_pred: numpy ndarray of shape (n_samples,)
torchchem/models/model.py:291
Methodpredict_on_batch
(self, X_batch)
torchchem/models/multitask_classification.py:113
Methodpredict_on_batch
(self, X_batch)
torchchem/models/multitask_regression.py:108
Methodpredict_on_batch
Makes predictions on given batch of new data. Parameters ---------- X: np.ndarray Features
torchchem/models/model.py:55
Methodpredict_proba
(self, dataset, transformers=[], n_classes=2)
torchchem/models/model.py:318
Methodpredict_proba_on_batch
(self, X_batch)
torchchem/models/multitask_classification.py:121
Methodpredict_proba_on_batch
(self, X_batch)
torchchem/models/multitask_regression.py:116
Methodraw_file_names
Returns ------- list File paths of saved data batches.
torchchem/data/mol_dataset.py:63
Methodreload
Reload trained model from disk.
torchchem/models/model.py:67
Methodreorder_with_indices
Reorder the data batches according to new indices Usually used after shuffle Parameters ---------- indices : list, optional
torchchem/data/mol_dataset.py:185
Methodstate
(self)
contrib/MolDQN/environment.py:375
Methodtest_classification_init
Test that classification init can happen.
torchchem/models/tests/test_multitask.py:8
Methodtest_mat
Simple test that initializes and fits a MAT.
torchchem/models/tests/test_mat.py:10
Methodtest_mol_to_graph
Test conversion of molecule to graph.
torchchem/feat/tests/test_neural_fp.py:12
Methodtest_regression_init
Test that regression init can happen.
torchchem/models/tests/test_multitask.py:15
Methodvisualize_state
Draws the molecule of the state. Args: state: String, Chem.Mol, or Chem.RWMol. If string is prov ided, it is considered as the SMIL
contrib/MolDQN/environment.py:485
← previous101–169 of 169, ranked by callers