PATTERN_TANIMOTO_CVIP

pattern_tanimoto_cvip() - takes two csv files as input, test and training set, then calculates the Tanimoto similarity metric by comparing each vector in the test set to each in the training set.

Contents

SYNTAX

d = pattern_tanimoto_cvip(file_tt, file_tr)

Input Parameters include :

Output Parameters include :

DESCRIPTION

Using Tanimoto similarity metric, the function calculates the distance between the vectors in training set and the test set. The distances are returned in a matrix form whose rows represent the test vectors and columns represent the training vectors.

REFERENCE

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

EXAMPLE

%  Test set file

 file_tt = 'myTestVectors.CSV';

% Training set file

 file_tr = 'myTrainingVectors.CSV';

% Calling function

 d = pattern_tanimoto_cvip(file_tt, file_tr)
d =

    1.1484    1.7218    2.8307    0.4004    0.6233    0.9621    0.9621
   -1.9302   -1.8000   -1.6349   -6.7143   -3.8571   -2.4815   -2.4815
    4.8824    9.0000  -34.3333    0.8868    1.1739    2.0303    2.0303
   -2.1212   -1.8706   -1.6727  -25.6667   -4.3636   -2.5745   -2.5745
   10.0476   28.0000  -11.0870    1.0901    1.3673    2.4627    2.4627
    1.7073    2.5238    4.8421    0.5310    0.7619    1.1980    1.1980
    1.0000    0.9010    1.0971    0.4383    0.3864    0.4878    0.4878
    1.0272    1.0000    1.2637    0.4339    0.4202    0.5483    0.5483
    0.8091    0.8064    1.0000    0.3614    0.3599    0.4667    0.4667
    4.3288    3.0733    4.8060    1.0000    0.7926    1.0637    1.0637
    5.6667    5.4151   16.8947    1.0238    1.0000    1.5000    1.5000
    2.2222    2.2977    3.6075    0.6855    0.7059    1.0000    1.0000

CREDITS

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