PATTERN_MAXIMUM_CVIP
pattern_maximum_cvip() - takes two csv files as input, test and training set, then calculates the maximum value distance metric by comparing each vector in the test set to each in the training set.
Contents
SYNTAX
d = pattern_maximum_cvip(file_tt, file_tr)
Input Parameters include :
- file_tt - Name of the test set file. A CSV file with a predefined structure.
- file_tr - Name of the training set file. A CSV file with a predefined structure.
Output Parameters include :
- d - A matrix containing the distances between each vector in the test set to each vector in the training set. Each column represents a vector in training set. Each row represents a vector in test set.
DESCRIPTION
Using maximum value 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_maximum_cvip(file_tt, file_tr)
d = 25 20 21 16 11 12 12 24 19 21 15 10 12 12 21 16 17 12 7 8 8 25 20 21 16 11 12 12 20 15 16 11 6 7 7 23 18 19 14 9 10 10 0 5 8 9 14 13 13 5 0 4 13 9 8 8 8 4 0 17 13 9 9 9 13 17 0 5 8 8 14 9 13 5 0 4 4 13 8 9 8 4 0 0
CREDITS
Author: Mehrdad Alvandipour, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website