OEShapeSimFuncType¶
This namespace is used to set which similarity function,
‘Tanimoto’ or ‘Tversky’, OEShapeDatabase objects use to score search
results. The default option is OEShapeSimFuncType.Tanimoto
.
Tversky scoring is set using the OEShapeDatabaseOptions.SetSimFunc
member function of OEShapeDatabaseOptions.
Note
Tanimoto and Tversky scoring options are mutually exclusive therefore, whichever function was previously selected before performing a search will be the one used to calculate the subsequent score. If no function is set the default function is used.
Default
Set OEShapeDatabaseOptions to instruct
OEShapeDatabaseScore to
calculate scores for search results using the tanimoto similarity
function. See OEShapeSimFuncType.Tanimoto
for more
details on usage.
Tanimoto
Set OEShapeDatabaseOptions to instruct
OEShapeDatabaseScore to
calculate scores for search results using the tanimoto similarity
function.
To retrieve the “shape” tanimoto score use either
OEShapeDatabaseScore.GetShapeTanimoto
or
OEShapeDatabaseScore.GetShapeScore
.
To retrieve the “color” tanimoto score use either
OEShapeDatabaseScore.GetColorTanimoto
or
OEShapeDatabaseScore.GetColorScore
.
To retrieve the combined “shape” and “color” tanimoto scores use either
OEShapeDatabaseScore.GetTanimotoCombo
or
OEShapeDatabaseScore.GetScore
.
Tversky
Set OEShapeDatabaseOptions to instruct
OEShapeDatabaseScore to
calculate scores for search results using the tversky similarity
function.
To retrieve the “shape” tversky score use either
OEShapeDatabaseScore.GetShapeTversky
or
OEShapeDatabaseScore.GetShapeScore
.
To retrieve the “color” tversky score use either
OEShapeDatabaseScore.GetColorTversky
or
OEShapeDatabaseScore.GetColorScore
.
To retrieve the combined “shape” and “color” tversky scores use either
OEShapeDatabaseScore.GetTverskyCombo
or
OEShapeDatabaseScore.GetScore
.
Warning
If using the OEShapeDatabaseScore.GetColorScore
,
OEShapeDatabaseScore.GetShapeScore
or
OEShapeDatabaseScore.GetScore
methods to retrieve scores it
is advised that the OEShapeDatabaseOptions.GetSimFunc
method
is used to determine which similarity function the scores were calculated with.
Note
See OEShapeDatabaseType
for details
of how to set OEShapeDatabaseOptions to
store only “shape” scores or both “shape” and “color” scores.
Warning
Color-only functionality is currently not supported.
See Molecular Shape section in the Shape TK theory documentation for a description of the Tanimoto and Tversky similarity functions.