oddt.scoring.functions package¶
Submodules¶
oddt.scoring.functions.NNScore module¶
-
class
oddt.scoring.functions.NNScore.
nnscore
(protein=None, n_jobs=-1, **kwargs)[source]¶ Bases:
oddt.scoring.scorer
Methods
fit
(ligands, target, *args, **kwargs)Trains model on supplied ligands and target values gen_training_data
(pdbbind_dir[, ...])load
([filename, pdbbind_version])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. train
([home_dir, sf_pickle, pdbbind_version])-
fit
(ligands, target, *args, **kwargs)¶ 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.
-
predict
(ligands, *args, **kwargs)¶ 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)¶ 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)¶ 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)¶ Saves scoring function to a pickle file.
Parameters: filename: string
Pickle filename
-
score
(ligands, target, *args, **kwargs)¶ 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
-
set_protein
(protein)¶ Proxy method to update protein in all relevant places.
Parameters: protein: oddt.toolkit.Molecule object
New default protein
-
oddt.scoring.functions.RFScore module¶
-
class
oddt.scoring.functions.RFScore.
rfscore
(protein=None, n_jobs=-1, version=1, spr=0, **kwargs)[source]¶ Bases:
oddt.scoring.scorer
Methods
fit
(ligands, target, *args, **kwargs)Trains model on supplied ligands and target values gen_training_data
(pdbbind_dir[, ...])load
([filename, version, pdbbind_version])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. train
([home_dir, sf_pickle, pdbbind_version])-
fit
(ligands, target, *args, **kwargs)¶ 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.
-
predict
(ligands, *args, **kwargs)¶ 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)¶ 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)¶ 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)¶ Saves scoring function to a pickle file.
Parameters: filename: string
Pickle filename
-
score
(ligands, target, *args, **kwargs)¶ 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
-
set_protein
(protein)¶ Proxy method to update protein in all relevant places.
Parameters: protein: oddt.toolkit.Molecule object
New default protein
-
Module contents¶
-
class
oddt.scoring.functions.
rfscore
(protein=None, n_jobs=-1, version=1, spr=0, **kwargs)[source]¶ Bases:
oddt.scoring.scorer
Methods
fit
(ligands, target, *args, **kwargs)Trains model on supplied ligands and target values gen_training_data
(pdbbind_dir[, ...])load
([filename, version, pdbbind_version])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. train
([home_dir, sf_pickle, pdbbind_version])-
fit
(ligands, target, *args, **kwargs)¶ 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.
-
predict
(ligands, *args, **kwargs)¶ 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)¶ 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)¶ 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)¶ Saves scoring function to a pickle file.
Parameters: filename: string
Pickle filename
-
score
(ligands, target, *args, **kwargs)¶ 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
-
set_protein
(protein)¶ Proxy method to update protein in all relevant places.
Parameters: protein: oddt.toolkit.Molecule object
New default protein
-
-
class
oddt.scoring.functions.
nnscore
(protein=None, n_jobs=-1, **kwargs)[source]¶ Bases:
oddt.scoring.scorer
Methods
fit
(ligands, target, *args, **kwargs)Trains model on supplied ligands and target values gen_training_data
(pdbbind_dir[, ...])load
([filename, pdbbind_version])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. train
([home_dir, sf_pickle, pdbbind_version])-
fit
(ligands, target, *args, **kwargs)¶ 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.
-
predict
(ligands, *args, **kwargs)¶ 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)¶ 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)¶ 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)¶ Saves scoring function to a pickle file.
Parameters: filename: string
Pickle filename
-
score
(ligands, target, *args, **kwargs)¶ 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
-
set_protein
(protein)¶ Proxy method to update protein in all relevant places.
Parameters: protein: oddt.toolkit.Molecule object
New default protein
-