tanimoto#

swordfish.function.tanimoto()#

If X and Y are scalars or vectors, return the result of their tanimoto distance.

If X or Y is a matrix, return a vector that is the result of the tanimoto distance between elements in each column. Note that if both X and Y are indexed matrices or indexed series, return the results of rows with the same label. Rows with different labels will be ignored.

As with all other aggregate functions, null values are ignored in the calculation.

Here is the formula of Tanimoto similarity (similar). Tanimoto distance is calculated as 1-similar.

Parameters:
  • X (Constant) – A numeric scalar, or vector/matrix.

  • Y (Constant) – A numeric scalar, or vector/matrix.