Skip to content
Snippets Groups Projects

removed unused input

Merged Imported Giuseppe Gianni requested to merge train_OnOff_classifier into devel
55 files
+ 4351
241
Compare changes
  • Side-by-side
  • Inline
Files
55
+ 31
0
function [probability, class, normalizedFeatures] = apply_QDA(featureMatrix, featureNormCoef, modelTrained)
% Function that applies a binary QDA classifier
% on a given feature set.
%
% INPUTS:
% - featureMatrix: MxN array containing the N features of the M epochs of
% PPG signal to be classified
% - featureNormCoeff: struct containing normalization parameters for z-score normalization:
% mu: 1xN array with mu parameters for normalization, for each feature
% sigma: 1xN array with sigma parameters for normalization, for each feature
% - modelTrained: model returned from fitcdiscr
%
% OUTPUTS:
% - probability: probability: Mx1 array with output of the QDA for
% each epoch
% - class: Mx1 array with classification for each epoch
%
%% Input and output check
narginchk (3,3);
nargoutchk(0,3);
%% Quality classification
normalizedFeatures = (featureMatrix - featureNormCoef.mu)./featureNormCoef.sigma ;
[class, probability] = predict(modelTrained,normalizedFeatures);
end
Loading