Mercurial > hg > emotion-detection-top-level
comparison Code/Collation/basicMetricSet.m @ 3:e1cfa7765647
initial commit - this file calculates the basic set of metrics (mean, variance, min and max, from an array of supplied data.
author | Dawn Black <dawn.black@eecs.qmul.ac.uk> |
---|---|
date | Mon, 10 Sep 2012 09:20:12 +0100 |
parents | |
children | 92ca03a8fa99 |
comparison
equal
deleted
inserted
replaced
2:5fd388fdd6ef | 3:e1cfa7765647 |
---|---|
1 function [metrics] = basicMetricSet( frameByFrameMetric, statsFileID ) | |
2 % from ShahHewlitt2008 | |
3 | |
4 metrics = []; | |
5 | |
6 meanValue = mean( frameByFrameMetric ); | |
7 metrics = [metrics meanValue]; | |
8 fprintf( statsFileID, '\t %f ', meanValue ); | |
9 % % median F0 | |
10 % medianValue = median( frameByFrameMetric ); | |
11 % metrics = [metrics medianValue]; | |
12 % fprintf( statsFileID, '\t %f ', medianValue ); | |
13 % % Standard deviation | |
14 % stdValue = std( frameByFrameMetric ); | |
15 % metrics = [metrics stdValue]; | |
16 % fprintf( statsFileID, '\t %f ', stdValue ); | |
17 | |
18 % the varience seemed to make the pitch calculations worse, but I'm not | |
19 % sure I am using it correctly - Dawn | |
20 % Variance | |
21 varValue = var(frameByFrameMetric); | |
22 metrics = [metrics varValue]; | |
23 fprintf( statsFileID, '\t %f ', varValue ); | |
24 % Minimum | |
25 minValue = min( frameByFrameMetric ); | |
26 metrics = [metrics minValue]; | |
27 fprintf( statsFileID, '\t %f ', minValue ); | |
28 % Maximum | |
29 maxValue = max( frameByFrameMetric ); | |
30 metrics = [metrics maxValue]; | |
31 fprintf( statsFileID, '\t %f ', maxValue ); | |
32 % range | |
33 % rangeValue = max( frameByFrameMetric ) - min( frameByFrameMetric ); | |
34 % metrics = [metrics rangeValue]; | |
35 % fprintf( statsFileID, '\t %f ', rangeValue ); | |
36 end |