Line | |
---|
1 | %HEPATITIS 155 objects with 19 features in 2 classes |
---|
2 | % |
---|
3 | % X = HEPATITIS |
---|
4 | % |
---|
5 | % The hepatitis database from UCI to predict if the patient will live or |
---|
6 | % die. |
---|
7 | % |
---|
8 | % X = HEPATITIS(VAL); |
---|
9 | % |
---|
10 | % Per default the missing values are replaced by the mean value of the |
---|
11 | % corresponding feature. When you want to do something else, use one of |
---|
12 | % the options in missingvalues.m. |
---|
13 | function x = hepatitis(val); |
---|
14 | |
---|
15 | prdatasets(mfilename,1,'http://prtools.org/prdatasets/hepatitis.dat'); |
---|
16 | if nargin<1 |
---|
17 | val = 'mean'; |
---|
18 | end |
---|
19 | |
---|
20 | user.desc = 'The hepatitis database from UCI to predict if the patient will live or die.'; |
---|
21 | user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/hepatitis/'; |
---|
22 | cl = {'die' 'live'}; |
---|
23 | fl = {'age' 'sex' 'steroid' 'antivirals' 'fatigue' 'malaise' ... |
---|
24 | 'anorexia' 'liver big' 'liver firm' 'spleen palpable' 'spiders' ... |
---|
25 | 'ascites' 'varices' 'bilirubin' 'alk phosphate' 'sgot' 'albumin' ... |
---|
26 | 'protime' 'histology'}; |
---|
27 | |
---|
28 | a = load('hepatitis.dat'); |
---|
29 | x = pr_dataset(a(:,2:end),cl(a(:,1))); |
---|
30 | x = setfeatlab(x,fl); |
---|
31 | x = setname(x,'Hepatitis'); |
---|
32 | [x,msg] = prmissingvalues(x,val); |
---|
33 | user.desc = [user.desc msg]; |
---|
34 | x = setuser(x,user); |
---|
Note: See
TracBrowser
for help on using the repository browser.