Ignore:
Timestamp:
12/18/19 15:46:35 (5 years ago)
Author:
bduin
Message:
 
Location:
prdatasets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • prdatasets

    • Property svn:ignore
      •  

        old new  
        33*.data
        44*.asv
         5data
  • prdatasets/arrhythmia.m

    r132 r137  
    1 %ARRHYTHMIA 420 objects with 279 features in 12 classes
     1%ARRHYTHMIA 452 objects with 279 features in 13 classes
    22%
    3 %        X = ARRHYTHMIA(CLASS,VAL)
     3%        X = ARRHYTHMIA(VAL)
    44%
    55% 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);
     6% arrhythmia and to classify it in one of the 13 groups. Class 1 refers
     7% to 'normal' ECG classes 2 to 13 refer to different classes of
     8% arrhythmia.
    119%
    1210% By default features with missing values are removed. When something else
    1311% is desired, use one of the options in MISVAL for VAL.
    1412%
    15 % SEE ALSO <a href="http://prtools.tudelft.nl/prtools">PRTools Guide</a>, <a href="http://archive.ics.uci.edu/ml/">UCI Website</a>
     13% SEE ALSO <a href="http://37steps.com/prtools">PRTools Guide</a>, <a href="http://archive.ics.uci.edu/ml/">UCI Website</a>
    1614% PRTOOLS, DATASETS, MISVAL
    1715
    18 % Copyright: R.P.W. Duin
     16% Copyright: R.P.W. Duin, r.p.w.duin@37steps.com
    1917
    20 function x = arrhythmia(val)
    21 if nargin < 1,  val = 'f-remove'; end
    22 a = pr_getdata('http://prtools.tudelft.nl/prdatasets/arrhythmia.dat',1);
     18function a = arrhythmia(val)
    2319
    24 
    25 user.desc=['The Arrhymthmia database from UCI. The aim is to ' ...
     20if nargin < 1,   val = 'f-remove'; end
     21a = pr_loadmatfile;
     22if isempty(a)
     23  opt.delimeter = ',';
     24  opt.labfeat   = 280;
     25  fl = {'age' 'sex' 'height' 'weight' 'QRS duration' 'P-R interval' ...
     26    'Q-T interval' 'T interval' 'P interval' 'QRS' 'T' 'P' 'QRST' ...
     27    'J' 'heartrate'};
     28  fl1 = {'Q wave width' 'R wave width' 'S wave width' 'R'' wave width' ...
     29    'S'' wave width' 'number of intrinsic deflections' ...
     30    'ragged R wave' 'diphasic derivation of R wave' ...
     31    'ragged P wave' 'diphasic derivation of P wave' ...
     32    'ragged T wave' 'diphasic derivation of T wave'};
     33  fl = [fl strcat('DI-',fl1) strcat('DII-',fl1) strcat('DIII-',fl1) ...
     34    strcat('AVR-',fl1) strcat('AVL-',fl1) strcat('AVF-',fl1) ...
     35    strcat('V1-',fl1) strcat('V2-',fl1) strcat('V3-',fl1) ...
     36    strcat('V4-',fl1) strcat('V5-',fl1) strcat('V6-',fl1)];
     37  fl2 = {'JJ wave ampl' 'Q wave ampl' 'R wave ampl' ...
     38    'S wave ampl' 'R'' wave ampl' 'S'' wave ampl' 'P wave ampl' ...
     39    'T wave ampl' 'QRSA sum' 'QRSTA'};
     40  fl = [fl strcat('DI-',fl2) strcat('DII-',fl2) strcat('DIII-',fl2) ...
     41    strcat('AVR-',fl2) strcat('AVL-',fl2) strcat('AVF-',fl2) ...
     42    strcat('V1-',fl2) strcat('V2-',fl2) strcat('V3-',fl2) ...
     43    strcat('V4-',fl2) strcat('V5-',fl2) strcat('V6-',fl2)];
     44  opt.featnames = fl;
     45  opt.dsetname = 'Arrhythmia normal';
     46%   opt.classnames = {'benign' 'malignant'};
     47  opt.desc=['The Arrhymthmia database from UCI. The aim is to ' ...
    2648           'distinguish between the presence and absence of cardiac ' ...
    2749           'arrhythmia and to classify it in one of the 16 groups.'];
    28 user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/arrhythmia';
    29 
    30 fl = {'age' 'sex' 'height' 'weight' 'QRS duration' 'P-R interval' ...
    31 'Q-T interval' 'T interval' 'P interval' 'QRS' 'T' 'P' 'QRST' ...
    32 'J' 'heartrate'};
    33 fl1 = {'Q wave width' 'R wave width' 'S wave width' 'R'' wave width' ...
    34 'S'' wave width' 'number of intrinsic deflections' ...
    35 'ragged R wave' 'diphasic derivation of R wave' ...
    36 'ragged P wave' 'diphasic derivation of P wave' ...
    37 'ragged T wave' 'diphasic derivation of T wave'};
    38 fl = [fl strcat('DI-',fl1) strcat('DII-',fl1) strcat('DIII-',fl1) ...
    39 strcat('AVR-',fl1) strcat('AVL-',fl1) strcat('AVF-',fl1) ...
    40 strcat('V1-',fl1) strcat('V2-',fl1) strcat('V3-',fl1) ...
    41 strcat('V4-',fl1) strcat('V5-',fl1) strcat('V6-',fl1)];
    42 fl2 = {'JJ wave ampl' 'Q wave ampl' 'R wave ampl' ...
    43 'S wave ampl' 'R'' wave ampl' 'S'' wave ampl' 'P wave ampl' ...
    44 'T wave ampl' 'QRSA sum' 'QRSTA'};
    45 fl = [fl strcat('DI-',fl2) strcat('DII-',fl2) strcat('DIII-',fl2) ...
    46 strcat('AVR-',fl2) strcat('AVL-',fl2) strcat('AVF-',fl2) ...
    47 strcat('V1-',fl2) strcat('V2-',fl2) strcat('V3-',fl2) ...
    48 strcat('V4-',fl2) strcat('V5-',fl2) strcat('V6-',fl2)];
    49 
    50 x = pr_dataset(a(:,1:(end-1)),a(:,end));
    51 x = setfeatlab(x,fl);
    52 x = setname(x,'Arrhythmia normal');
    53 x = setuser(x,user);
    54 x = misval(x,val);
     50  opt.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/arrhythmia'; 
     51  a = pr_download('http://prtools.tudelft.nl/prdatasets/arrhythmia.dat',[],opt);
     52end
     53a = misval(a,val);
    5554
    5655return
Note: See TracChangeset for help on using the changeset viewer.