source: prdatasets/arrhythmia.m @ 91

Last change on this file since 91 was 81, checked in by bduin, 11 years ago
File size: 2.3 KB
Line 
1%ARRHYTHMIA 420 objects with 278 features in 12 classes
2%
3%        X = ARRHYTHMIA(CLASS,VAL)
4%
5% The aim is to distinguish between the presence and absence of cardiac
6% arrhythmia and to classify it in one of the 16 groups. Class 01 refers
7% to 'normal' ECG classes 02 to 15 refers to different classes of
8% arrhythmia and class 16 refers to the rest of unclassified ones.
9%
10%       X = ARRHYTHMIA(VAL);
11%
12% Per default the entries with missing values are removed. When you want
13% to do something else, use one of the options in missingvalues.m.
14function x = arrhythmia(val);
15
16prdatasets(mfilename,1,'http://prtools.org/prdatasets/arrhythmia.dat');
17if nargin<1
18        val = 'remove';
19end
20
21user.desc='The Arrhymthmia database from UCI. The aim is to distinguish between the presence and absence of cardiac arrhythmia and to classify it in one of the 16 groups.';
22user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/arrhythmia';
23
24fl = {'age' 'sex' 'height' 'weight' 'QRS duration' 'P-R interval' ...
25'Q-T interval' 'T interval' 'P interval' 'QRS' 'T' 'P' 'QRST' ...
26'J' 'heartrate'};
27fl1 = {'Q wave width' 'R wave width' 'S wave width' 'R'' wave width' ...
28'S'' wave width' 'number of intrinsic deflections' ...
29'ragged R wave' 'diphasic derivation of R wave' ...
30'ragged P wave' 'diphasic derivation of P wave' ...
31'ragged T wave' 'diphasic derivation of T wave'};
32fl = [fl strcat('DI-',fl1) strcat('DII-',fl1) strcat('DIII-',fl1) ...
33strcat('AVR-',fl1) strcat('AVL-',fl1) strcat('AVF-',fl1) ...
34strcat('V1-',fl1) strcat('V2-',fl1) strcat('V3-',fl1) ...
35strcat('V4-',fl1) strcat('V5-',fl1) strcat('V6-',fl1)];
36fl2 = {'JJ wave ampl' 'Q wave ampl' 'R wave ampl' ...
37'S wave ampl' 'R'' wave ampl' 'S'' wave ampl' 'P wave ampl' ...
38'T wave ampl' 'QRSA sum' 'QRSTA'};
39fl = [fl strcat('DI-',fl2) strcat('DII-',fl2) strcat('DIII-',fl2) ...
40strcat('AVR-',fl2) strcat('AVL-',fl2) strcat('AVF-',fl2) ...
41strcat('V1-',fl2) strcat('V2-',fl2) strcat('V3-',fl2) ...
42strcat('V4-',fl2) strcat('V5-',fl2) strcat('V6-',fl2)];
43
44a = load('arrhythmia.dat');
45x = pr_dataset(a(:,1:(end-1)),a(:,end));
46x = setfeatlab(x,fl);
47x = setname(x,'Arrhythmia normal');
48x(:,14) = [];  % there are so many missing values, that I just remove this
49[x,msg] = prmissingvalues(x,val);
50user.desc = [user.desc msg];
51x = setuser(x,user);
52x = setlablist(x);
53return
Note: See TracBrowser for help on using the repository browser.