oddt.scoring package¶
Subpackages¶
Module contents¶
-
class
oddt.scoring.
ensemble_model
(models)[source]¶ Bases:
object
Methods
fit
(X, y, *args, **kwargs)predict
(X, *args, **kwargs)score
(X, y, *args, **kwargs)
-
class
oddt.scoring.
scorer
(model_instances, descriptor_generator_instances, score_title='score')[source]¶ Bases:
object
Methods
fit
(ligands, target, *args, **kwargs)Trains model on supplied ligands and target values load
(filename)Loads scoring function from a pickle file. predict
(ligands, *args, **kwargs)Predicts values (eg. predict_ligand
(ligand)Local method to score one ligand and update it’s scores. predict_ligands
(ligands)Method to score ligands lazily save
(filename)Saves scoring function to a pickle file. score
(ligands, target, *args, **kwargs)Methods estimates the quality of prediction as squared correlation coefficient (R^2) set_protein
(protein)Proxy method to update protein in all relevant places. -
fit
(ligands, target, *args, **kwargs)[source]¶ Trains model on supplied ligands and target values
Parameters: ligands: array-like of ligands
Ground truth (correct) target values.
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Estimated target values.
-
classmethod
load
(filename)[source]¶ Loads scoring function from a pickle file.
Parameters: filename: string
Pickle filename
Returns: sf: scorer-like object
Scoring function object loaded from a pickle
-
predict
(ligands, *args, **kwargs)[source]¶ Predicts values (eg. affinity) for supplied ligands
Parameters: ligands: array-like of ligands
Ground truth (correct) target values.
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Estimated target values.
Returns: predicted: np.array or array of np.arrays of shape = [n_ligands]
Predicted scores for ligands
-
predict_ligand
(ligand)[source]¶ Local method to score one ligand and update it’s scores.
Parameters: ligand: oddt.toolkit.Molecule object
Ligand to be scored
Returns: ligand: oddt.toolkit.Molecule object
Scored ligand with updated scores
-
predict_ligands
(ligands)[source]¶ Method to score ligands lazily
Parameters: ligands: iterable of oddt.toolkit.Molecule objects
Ligands to be scored
Returns: ligand: iterator of oddt.toolkit.Molecule objects
Scored ligands with updated scores
-
save
(filename)[source]¶ Saves scoring function to a pickle file.
Parameters: filename: string
Pickle filename
-
score
(ligands, target, *args, **kwargs)[source]¶ Methods estimates the quality of prediction as squared correlation coefficient (R^2)
Parameters: ligands: array-like of ligands
Ground truth (correct) target values.
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Estimated target values.
Returns: r2: float
Squared correlation coefficient (R^2) for prediction
-