source: prdatasets/arrhythmia.m @ 95

Last change on this file since 95 was 94, checked in by bduin, 10 years ago
File size: 2.6 KB
RevLine 
[94]1%ARRHYTHMIA 420 objects with 279 features in 12 classes
[80]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%
[94]12% By default objects with missing values are removed. When something else
13% is desired, use one of the options in MISVAL. As some features have
14% many missing values we recommand to remove these features using
15% VAL = 'f-remove'.
16%
17% SEE ALSO <a href="http://37steps.com/prtools">PRTools Guide</a>, <a href="http://archive.ics.uci.edu/ml/">UCI Website</a>
18% PRTOOLS, DATASETS, MISVAL
19
20% Copyright: R.P.W. Duin, r.p.w.duin@prtools.org
21
[80]22function x = arrhythmia(val);
23
24prdatasets(mfilename,1,'http://prtools.org/prdatasets/arrhythmia.dat');
25if nargin<1
26        val = 'remove';
27end
28
29user.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.';
30user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/arrhythmia';
31
32fl = {'age' 'sex' 'height' 'weight' 'QRS duration' 'P-R interval' ...
33'Q-T interval' 'T interval' 'P interval' 'QRS' 'T' 'P' 'QRST' ...
34'J' 'heartrate'};
35fl1 = {'Q wave width' 'R wave width' 'S wave width' 'R'' wave width' ...
36'S'' wave width' 'number of intrinsic deflections' ...
37'ragged R wave' 'diphasic derivation of R wave' ...
38'ragged P wave' 'diphasic derivation of P wave' ...
39'ragged T wave' 'diphasic derivation of T wave'};
40fl = [fl strcat('DI-',fl1) strcat('DII-',fl1) strcat('DIII-',fl1) ...
41strcat('AVR-',fl1) strcat('AVL-',fl1) strcat('AVF-',fl1) ...
42strcat('V1-',fl1) strcat('V2-',fl1) strcat('V3-',fl1) ...
43strcat('V4-',fl1) strcat('V5-',fl1) strcat('V6-',fl1)];
44fl2 = {'JJ wave ampl' 'Q wave ampl' 'R wave ampl' ...
45'S wave ampl' 'R'' wave ampl' 'S'' wave ampl' 'P wave ampl' ...
46'T wave ampl' 'QRSA sum' 'QRSTA'};
47fl = [fl strcat('DI-',fl2) strcat('DII-',fl2) strcat('DIII-',fl2) ...
48strcat('AVR-',fl2) strcat('AVL-',fl2) strcat('AVF-',fl2) ...
49strcat('V1-',fl2) strcat('V2-',fl2) strcat('V3-',fl2) ...
50strcat('V4-',fl2) strcat('V5-',fl2) strcat('V6-',fl2)];
51
52a = load('arrhythmia.dat');
[81]53x = pr_dataset(a(:,1:(end-1)),a(:,end));
[80]54x = setfeatlab(x,fl);
55x = setname(x,'Arrhythmia normal');
[94]56%x(:,14) = [];  % there are so many missing values, that I just remove this
57%               % don't do this, nice but confusing
58[x,msg] = misval(x,val);
[80]59user.desc = [user.desc msg];
60x = setuser(x,user);
61x = setlablist(x);
62return
Note: See TracBrowser for help on using the repository browser.