Changeset 137 for prdatasets/hepatitis.m
- Timestamp:
- 12/18/19 15:46:35 (5 years ago)
- Location:
- prdatasets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
prdatasets
- Property svn:ignore
-
old new 3 3 *.data 4 4 *.asv 5 data
-
- Property svn:ignore
-
prdatasets/hepatitis.m
r132 r137 1 1 %HEPATITIS 155 objects with 19 features in 2 classes 2 2 % 3 % X= HEPATITIS3 % A = HEPATITIS 4 4 % 5 5 % The hepatitis database from UCI to predict if the patient will live or 6 6 % die. 7 7 % 8 % X= HEPATITIS(VAL)8 % A = HEPATITIS(VAL) 9 9 % 10 10 % By default objects with missing values are removed. When something else 11 11 % is desired, use one of the options in MISVAL. 12 12 % 13 % 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> 14 14 % PRTOOLS, DATASETS, MISVAL 15 15 16 % Copyright: R.P.W. Duin 16 % Copyright: R.P.W. Duin, r.p.w.duin@37steps.com 17 17 18 function x = hepatitis(val);18 function a = hepatitis(val) 19 19 20 prdatasets(mfilename,1,'http://prtools.tudelft.nl/prdatasets/hepatitis.dat');21 20 if nargin<1 22 21 val = 'remove'; 23 22 end 24 23 25 user.desc = 'The hepatitis database from UCI to predict if the patient will live or die.';26 user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/hepatitis/'; 27 cl = {'die' 'live'};28 fl = {'age' 'sex' 'steroid' 'antivirals' 'fatigue' 'malaise' ... 29 'anorexia' 'liver big' 'liver firm' 'spleen palpable' 'spiders' ...30 'ascites' 'varices' 'bilirubin' 'alk phosphate' 'sgot' 'albumin' ...31 'protime' 'histology'}; 32 33 a = load('hepatitis.dat');34 x = pr_dataset(a(:,2:end),cl(a(:,1)));35 x = setfeatlab(x,fl);36 x = setname(x,'Hepatitis');37 [x,msg] = misval(x,val);38 user.desc = [user.desc msg]; 39 x = setuser(x,user);24 a = pr_loadmatfile; 25 if isempty(a) 26 opt.delimeter = ' '; 27 opt.labfeat = 1; 28 opt.featnames = {'age' 'sex' 'steroid' 'antivirals' 'fatigue' 'malaise' ... 29 'anorexia' 'liver big' 'liver firm' 'spleen palpable' 'spiders' ... 30 'ascites' 'varices' 'bilirubin' 'alk phosphate' 'sgot' 'albumin' ... 31 'protime' 'histology'}; 32 opt.classnames = {'die' 'live'}; 33 opt.desc = 'The hepatitis database from UCI to predict if the patient will live or die.'; 34 user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/hepatitis/'; 35 opt.dsetname = 'Hepatitis Data Set'; 36 a = pr_download('http://prtools.tudelft.nl/prdatasets/hepatitis.dat',[],opt); 37 end 38 a = misval(a,val);
Note: See TracChangeset
for help on using the changeset viewer.