source: prdatasets/heart.m @ 155

Last change on this file since 155 was 150, checked in by bduin, 5 years ago
File size: 1.5 KB
RevLine 
[80]1%HEART 303 objects with 13 features in 2 classes
2%
[94]3%       X = HEART
[80]4%
5% Heart-Cleveland dataset from the Hungarian Institute of Cardiology.
6% Budapest: Andras Janosi, M.D.
7%
[94]8%       X = HEART(VAL)
[80]9%
[94]10% By default objects with missing values are removed. When something else
11% is desired, use one of the options in MISVAL.
12%
[150]13% SEE ALSO <a href="http://prtools.tudelft.nl/prtools/">PRTools Guide</a>, <a href="http://archive.ics.uci.edu/ml/">UCI Website</a>
[94]14% PRTOOLS, DATASETS, MISVAL
15
[150]16% Copyright: R.P.W. Duin
[94]17
[137]18function a = heart(val)
[80]19
20if nargin<1
21        val = 'remove';
22end
[137]23a = pr_loadmatfile;
24if isempty(a)
25  opt.labfeat   = 14;
26  opt.featnames = {'age' 'sex' 'cp' 'trestbps' 'chol' 'fbs' 'restecg' ...
27      'thalach' 'exang' 'oldpeak' 'slope' 'ca' 'thal'};
28  opt.classnames = {'absent' 'present'  'present'  'present'  'present'};
29        opt.desc='The Cleveland database from the Heart Disease Databases from UCI.  The class disease-presence is used as target class. ';
30        opt.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/heart-cleveland/';
31  opt.dsetname = 'Heart Cleveland';
32  a = pr_download('http://prtools.tudelft.nl/prdatasets/heart.dat',[],opt);
33  nlab = getnlab(a);
34  nlab(nlab>1) = 2;
35  a = setnlab(a,nlab);
36  a = remclass(a);
37  fd = {[0 inf; 0 inf] [0 1] [1 2 3 4] [0 inf; 0 inf] [0 inf; 0 inf] ...
[122]38      [0 1] [0 1 2] [0 inf; 0 inf] [0 1] [0 inf; 0 inf] [1 2 3] [-1 0 1 2 3] [3 6 7]};
[137]39  x = setfeatdom(a,fd);
40  pr_savematfile(a);
41end
42[a,msg] = misval(a,val);
[80]43
44return
Note: See TracBrowser for help on using the repository browser.