Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
retina-hd-mea-public
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NBT008 - Public
retina-hd-mea-public
Merge requests
!2
removed unused input
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Imported
removed unused input
train_OnOff_classifier
into
devel
Overview
0
Commits
15
Pipelines
0
Changes
55
Merged
Imported
Giuseppe Gianni
requested to merge
train_OnOff_classifier
into
devel
7 months ago
Overview
0
Commits
15
Pipelines
0
Changes
55
Expand
0
0
Merge request reports
Compare
devel
devel (base)
and
latest version
latest version
e0d2eaf9
15 commits,
7 months ago
55 files
+
4351
−
241
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
55
Search (e.g. *.vue) (Ctrl+P)
OnOff_classifier/apply_QDA.m
0 → 100644
+
31
−
0
Options
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