jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.descriptors.metrics
Class TverskyParameters

Object
  extended by com.chemaxon.descriptors.metrics.TverskyParameters
All Implemented Interfaces:
BinaryVectorComparator, MetricMetadata, Serializable

@Beta
public class TverskyParameters
extends Object
implements MetricMetadata, BinaryVectorComparator, Serializable

Parameters for Tversky index.

Please note that this class is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.

Author:
Gabor Imre
See Also:
http://en.wikipedia.org/wiki/Tversky_index, Serialized Form

Nested Class Summary
static class TverskyParameters.Builder
          Builder for parameter object.
 
Nested classes/interfaces inherited from interface com.chemaxon.descriptors.metrics.BinaryVectorComparator
BinaryVectorComparator.Util
 
Constructor Summary
  TverskyParameters()
          Instantiate with default values.
protected TverskyParameters(TverskyParameters.Builder builder)
          Instantiate with builder's actual state.
 
Method Summary
 double calculateBinaryVectorDissimilarity(int bitCount, int targetOnly, int queryOnly, int common)
          Calculate represented dissimilarity score from binary vector parameters.
 double calculateBinaryVectorSimilarity(int bitCount, int targetOnly, int queryOnly, int common)
          Calculate represented similarity score from binary vector parameters.
 double getCoeffQuery()
          Query side coefficient.
 double getCoeffTarget()
          Target side coefficient.
 double getLowerBoundForBinaryVectors(int bitCount)
          Possible lowest value of similarity/dissimilarity scores.
 double getUpperBoundForBinaryVectors(int bitCount)
          Possible highest value of similarity/dissimilarity scores.
 boolean isDissimilarityZeroIFFEquals()
          Zero dissimilarity and identity.
 boolean isMetricSpace()
          Metric space.
 boolean isNonNegative()
          Non negativeness of the dissimilarity values.
 boolean isSymmetric()
          Symmetry.
 boolean isTriangeInequalityHolds()
          Triangle inequality.
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TverskyParameters

protected TverskyParameters(TverskyParameters.Builder builder)
Instantiate with builder's actual state.

Parameters:
builder - State to represent

TverskyParameters

public TverskyParameters()
Instantiate with default values.

Method Detail

isSymmetric

public boolean isSymmetric()
Description copied from interface: MetricMetadata
Symmetry.

Specified by:
isSymmetric in interface MetricMetadata
Returns:
true when d(x,y) = d(y,x)
See Also:
http://en.wikipedia.org/wiki/Metric_space

isNonNegative

public boolean isNonNegative()
Description copied from interface: MetricMetadata
Non negativeness of the dissimilarity values.

Specified by:
isNonNegative in interface MetricMetadata
Returns:
true when d(x,y) >= 0
See Also:
http://en.wikipedia.org/wiki/Metric_space

isDissimilarityZeroIFFEquals

public boolean isDissimilarityZeroIFFEquals()
Description copied from interface: MetricMetadata
Zero dissimilarity and identity.

Specified by:
isDissimilarityZeroIFFEquals in interface MetricMetadata
Returns:
true when dissimilarity is 0 for (and only for) identical descriptors
See Also:
http://en.wikipedia.org/wiki/Metric_space

isTriangeInequalityHolds

public boolean isTriangeInequalityHolds()
Description copied from interface: MetricMetadata
Triangle inequality.

Specified by:
isTriangeInequalityHolds in interface MetricMetadata
Returns:
true when d(x,z) <= d(x,y) + d( y,z)
See Also:
http://en.wikipedia.org/wiki/Metric_space

isMetricSpace

public boolean isMetricSpace()
Description copied from interface: MetricMetadata
Metric space.

Specified by:
isMetricSpace in interface MetricMetadata
Returns:
If this comparator defines a metric space.
See Also:
http://en.wikipedia.org/wiki/Metric_space

calculateBinaryVectorDissimilarity

public double calculateBinaryVectorDissimilarity(int bitCount,
                                                 int targetOnly,
                                                 int queryOnly,
                                                 int common)
Description copied from interface: BinaryVectorComparator
Calculate represented dissimilarity score from binary vector parameters.

Specified by:
calculateBinaryVectorDissimilarity in interface BinaryVectorComparator
Parameters:
bitCount - Length of binary vectors in bits
targetOnly - Number of bit positions where only target contains set bits
queryOnly - Number of bit positions where only query contains set bits
common - Number of bit positions where both query and target contains set bits
Returns:
Dissimilarity score

calculateBinaryVectorSimilarity

public double calculateBinaryVectorSimilarity(int bitCount,
                                              int targetOnly,
                                              int queryOnly,
                                              int common)
Description copied from interface: BinaryVectorComparator
Calculate represented similarity score from binary vector parameters.

Specified by:
calculateBinaryVectorSimilarity in interface BinaryVectorComparator
Parameters:
bitCount - Length of binary vectors in bits
targetOnly - Number of bit positions where only target contains set bits
queryOnly - Number of bit positions where only query contains set bits
common - Number of bit positions where both query and target contains set bits
Returns:
Ssimilarity score

getLowerBoundForBinaryVectors

public double getLowerBoundForBinaryVectors(int bitCount)
Description copied from interface: BinaryVectorComparator
Possible lowest value of similarity/dissimilarity scores.

Specified by:
getLowerBoundForBinaryVectors in interface BinaryVectorComparator
Parameters:
bitCount - Length of binary vectors in bits
Returns:
Possible lowest value of similarity/dissimilarity scores

getUpperBoundForBinaryVectors

public double getUpperBoundForBinaryVectors(int bitCount)
Description copied from interface: BinaryVectorComparator
Possible highest value of similarity/dissimilarity scores.

Specified by:
getUpperBoundForBinaryVectors in interface BinaryVectorComparator
Parameters:
bitCount - Length of binary vectors in bits
Returns:
Possible highest value of similarity/dissimilarity scores

getCoeffQuery

public double getCoeffQuery()
Query side coefficient.

Returns:
Query coefficient

getCoeffTarget

public double getCoeffTarget()
Target side coefficient.

Returns:
Target coefficient

toString

public String toString()
Overrides:
toString in class Object

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)