Mercurial > hg > aasp-d-case-metrics
view event_detection/convertEventListToEventRoll.m @ 5:1f977a3aab1a
overall confusion matrix: check for rowsum equality; and format cm as rounded percentages
author | Dan Stowell <dan.stowell@elec.qmul.ac.uk> |
---|---|
date | Mon, 13 May 2013 14:42:31 +0100 |
parents | 2c9915c861d8 |
children |
line wrap: on
line source
function [eventRoll] = convertEventListToEventRoll(onset,offset,classNames) % Initialize eventRoll = zeros(ceil(offset(length(offset))*100),16); eventID = {'alert','clearthroat','cough','doorslam','drawer','keyboard','keys',... 'knock','laughter','mouse','pageturn','pendrop','phone','printer','speech','switch'}; % Fill-in eventRoll for i=1:length(onset) pos = strmatch(classNames{i}, eventID); eventRoll(floor(onset(i)*100):ceil(offset(i)*100),pos) = 1; end;