Class MDMetricOptimizer
Optimization of metric parameters for dissimilarity based screening. Parameter optimization is uniform for each metric: it is based on the optimization of the performance of the metrics when used for screening molecules. Optimization is performed defining the parameters as variables, its goal is to maximize the selected evaluator function of the given MDHitEvaluator object during screening performed on a test set. The test set consists of actives (similar set) mixed with molecules randomly selected from the target set of screening (dissimilar set).
Parameters are written into the common MDParameters object, determined from the query descriptors.
The MDHitEvaluator object must be set up, for its usage see
MDHitEvaluator
. Parametrized metrics must be set
(weighted, asymmetric, scaled, etc.)
MDReaders also must be set up, for usage see MDReader
.
Typical usage:
MDMetricOptimizer metrOpt = new MDMetricOPtimizer( evaluator ); metrOpt.optimizeParameters( pfp2DIndex, euclideanIndex, similarReader, dissimilarReader );
- Since:
- JChem 2.0
-
Field Summary
Modifier and TypeFieldDescriptionfloat
Maximal allowed difference in last two calculated values of the enrichment ratio function for termination.float
Maximal allowed dofference in last two calculated values of the weight variables for termination.int
Maximal allowed number of iterationsfloat
Consider enrichment ratio values only in cases, when at least the given percent of similars is selected as hits. -
Constructor Summary
ConstructorDescriptionMDMetricOptimizer
(MDHitEvaluator evaluator) Constructor of parameter optimizer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
optimizeParameters
(int mdIndex, int metricIndex, MDReader similarSet, MDReader dissimilarSet) Finds optimal parameter values for the given metric.
-
Field Details
-
nrOfIterations
public int nrOfIterationsMaximal allowed number of iterations -
maxErrorInF
public float maxErrorInFMaximal allowed difference in last two calculated values of the enrichment ratio function for termination. -
maxErrorInX
public float maxErrorInXMaximal allowed dofference in last two calculated values of the weight variables for termination. -
percentage
public float percentageConsider enrichment ratio values only in cases, when at least the given percent of similars is selected as hits.
-
-
Constructor Details
-
MDMetricOptimizer
Constructor of parameter optimizer.- Parameters:
evaluator
- Evaluator of acive/inactive hits
-
-
Method Details
-
optimizeParameters
public void optimizeParameters(int mdIndex, int metricIndex, MDReader similarSet, MDReader dissimilarSet) throws MDReaderException Finds optimal parameter values for the given metric. Parameters are set and can be withdrawn from the common MDParameters object.- Parameters:
mdIndex
- Index of molecular descriptormetricIndex
- Index of metricsimilarSet
- Reader of the set containing actives to be selected as hitsdissimilarSet
- Reader of target fingerprints- Throws:
MDReaderException
- if the reader encounter a read error
-