TANIMOTO_METRIC_CVIP

tanimoto_metric_cvip() - calculates the Tanimoto similarity metric between two feature vectors.

Contents

SYNTAX

d =  tanimoto_metric_cvip( vector1, vector2)

Input Parameters include :

Output Parameters include :

DESCRIPTION

This function calvulates the Tanimoto similarity measure between the two feature vectors given as input by the user.

Tanimoto metric is a similarity measure defined for vectors x and y as:

$$S_T(x,y) = \frac{\sum_{i=1}^n x_i y_i}{\sum_{i=1}^n x_i^2 + \sum_{i=1}^n y_i^2 - \sum_{i=1}^n x_i y_i} $$

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Input vectors

 vector1 = [1 3 4 2];

 vector2 = [-3 3.2 sqrt(2) pi];

% Output tanimoto similarity metric

 d =  tanimoto_metric_cvip( vector1, vector2)
d =

    0.4355

CREDITS

Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website