oddt.scoring.functions package¶
Submodules¶
oddt.scoring.functions.NNScore module¶
-
class
oddt.scoring.functions.NNScore.nnscore(protein=None, n_jobs=-1)[source]¶ Bases:
oddt.scoring.scorerMethods
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 using model’s default 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
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
-
gen_training_data(pdbbind_dir, pdbbind_versions=(2007, 2012, 2013, 2014, 2015, 2016), home_dir=None)[source]¶
-
predict(ligands, *args, **kwargs)¶ Predicts values (eg. affinity) for supplied ligands.
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
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 using model’s default score (accuracy for classification or R^2 for regression)
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
Returns: s: float
Quality score (accuracy or 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.scorerMethods
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 using model’s default 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
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
-
gen_training_data(pdbbind_dir, pdbbind_versions=(2007, 2012, 2013, 2014, 2015, 2016), home_dir=None)[source]¶
-
predict(ligands, *args, **kwargs)¶ Predicts values (eg. affinity) for supplied ligands.
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
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 using model’s default score (accuracy for classification or R^2 for regression)
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
Returns: s: float
Quality score (accuracy or 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.scorerMethods
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 using model’s default 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
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
-
gen_training_data(pdbbind_dir, pdbbind_versions=(2007, 2012, 2013, 2014, 2015, 2016), home_dir=None)[source]¶
-
predict(ligands, *args, **kwargs)¶ Predicts values (eg. affinity) for supplied ligands.
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
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 using model’s default score (accuracy for classification or R^2 for regression)
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
Returns: s: float
Quality score (accuracy or 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)[source]¶ Bases:
oddt.scoring.scorerMethods
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 using model’s default 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
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
-
gen_training_data(pdbbind_dir, pdbbind_versions=(2007, 2012, 2013, 2014, 2015, 2016), home_dir=None)[source]¶
-
predict(ligands, *args, **kwargs)¶ Predicts values (eg. affinity) for supplied ligands.
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
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 using model’s default score (accuracy for classification or R^2 for regression)
Parameters: ligands: array-like of ligands
Molecules to featurize and feed into the model
- target: array-like of shape = [n_samples] or [n_samples, n_outputs]
Ground truth (correct) target values.
Returns: s: float
Quality score (accuracy or 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
-