PATTERN_VECTOR_INNER_PRODUCT_CVIP

pattern_vector_inner_product_cvip() - takes two csv files as input, test and training set, then calculates the normalized vector inner product metric by comparing each vector in the test set to each in the training set.

Contents

SYNTAX

d = pattern_vector_inner_product_cvip(file_tt, file_tr)

Input Parameters include :

Output Parameters include :

DESCRIPTION

Using normalized vector inner product, the function calculates the similarity 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_vector_inner_product_cvip(file_tt, file_tr)
d =

  Columns 1 through 6

         387         458         535         207         278         355
         166         180         206          94         108         134
         415         450         515         235         270         335
         140         159         184          77          96         121
         422         448         510         242         268         330
         420         477         552         231         288         363
        1037         983        1085         632         578         680
         983         970        1083         587         574         687
        1085        1083        1213         644         642         772
         632         587         644         389         344         401
         578         574         642         344         340         408
         680         687         772         401         408         493

  Column 7

         355
         134
         335
         121
         330
         363
         680
         687
         772
         401
         408
         493

CREDITS

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