clear all;
close all;
clc;

addpath 'descriptors'
addpath 'functions'

load MSRAction3D_AS3_HOD_16_2; % if it is not there, run prepareData.m with the appropriate configurations to create it.
% hodTrain: dataLength X nJoints X nParts X (nProjections * nBins);

if size(labelsTrain, 1) < size(labelsTrain, 2) % if rowvector, transpose
    labelsTrain = labelsTrain';
    labelsTest = labelsTest';
end

hodTrainNormalized = normalizeDescriptors(hodTrain);
hodTestNormalized = normalizeDescriptors(hodTest);
fprintf('Both training and testing data are normalized.\n');

classifySVM(hodTrainNormalized, labelsTrain, hodTestNormalized, labelsTest);