Rev | Line | |
---|
[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 | % |
---|
[137] | 13 | % SEE ALSO <a href="http://37steps.com/prtools">PRTools Guide</a>, <a href="http://archive.ics.uci.edu/ml/">UCI Website</a> |
---|
[94] | 14 | % PRTOOLS, DATASETS, MISVAL |
---|
| 15 | |
---|
[137] | 16 | % Copyright: R.P.W. Duin, r.p.w.duin@37steps.com |
---|
[94] | 17 | |
---|
[137] | 18 | function a = heart(val) |
---|
[80] | 19 | |
---|
| 20 | if nargin<1 |
---|
| 21 | val = 'remove'; |
---|
| 22 | end |
---|
[137] | 23 | a = pr_loadmatfile; |
---|
| 24 | if 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); |
---|
| 41 | end |
---|
| 42 | [a,msg] = misval(a,val); |
---|
[80] | 43 | |
---|
| 44 | return |
---|
Note: See
TracBrowser
for help on using the repository browser.