## org.apache.mahout.math.hadoop.similarity.cooccurrence.measures
Class TanimotoCoefficientSimilarity

    java.lang.Object
      org.apache.mahout.math.hadoop.similarity.cooccurrence.measures.CountbasedMeasure
          org.apache.mahout.math.hadoop.similarity.cooccurrence.measures.TanimotoCoefficientSimilarity

All Implemented Interfaces:
  VectorSimilarityMeasure

    public class TanimotoCoefficientSimilarity

extends CountbasedMeasure

Field Summary

Fields inherited from interface org.apache.mahout.math.hadoop.similarity.cooccurrence.measures.VectorSimilarityMeasure
`NO_NORM`

Constructor Summary
`TanimotoCoefficientSimilarity()`

Method Summary
`boolean` `consider(int numNonZeroEntriesA, int numNonZeroEntriesB, double maxValueA, double maxValueB, double threshold)`
`double` `similarity(double dots, double normA, double normB, int numberOfColumns)`

Methods inherited from class org.apache.mahout.math.hadoop.similarity.cooccurrence.measures.CountbasedMeasure
`aggregate, norm, normalize`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TanimotoCoefficientSimilarity

    public TanimotoCoefficientSimilarity()

Method Detail

### similarity

    public double similarity(double dots,
                             double normA,
                             double normB,
                             int numberOfColumns)

### consider

    public boolean consider(int numNonZeroEntriesA,
                            int numNonZeroEntriesB,
                            double maxValueA,
                            double maxValueB,
                            double threshold)

  Specified by:
    `consider` in interface `VectorSimilarityMeasure`
  Overrides:
    `consider` in class `CountbasedMeasure`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.