OETverskySim
class OETverskySim : public OEGraphSim::OESimFuncBase
This class represents OETverskySim that
calculates the Tversky
similarity score.
Formula:
\(Sim_{Tversky}(A,B) = \frac{bothAB}{\alpha * onlyA + \beta * onlyB + bothAB}\)
The following methods are publicly inherited from OESimFuncBase:
Constructors
OETverskySim(a: float = 0.95) -> OETverskySim
Default constructor (\(\alpha = 0.95\), \(\beta = 1.0 - \alpha = 0.05\))
OETverskySim(a: float, b: float) -> OETverskySim
Constructor with arbitrary \(\alpha\) and \(\beta\) parameters.
operator()
__call__(fpA: OEFingerPrint, fpB: OEFingerPrint) -> float
Returns the Tversky
similarity coefficient of the two given
OEFingerPrint objects.
CreateCopy
CreateCopy() -> OETverskySim
Deep copy constructor that returns a copy of the object. The memory for the returned OETverskySim object is dynamically allocated and owned by the caller.
GetAlpha
GetAlpha() -> float
Returns the \(\alpha\) parameter of the
Tversky similarity
calculation.
GetBeta
GetBeta() -> float
Returns the \(\beta\) parameter of the
Tversky similarity
calculation.
GetSimTypeString
GetSimTypeString() -> str
Returns a string representation of the OETverskySim class.