%HEPATITIS 155 objects with 19 features in 2 classes
%
%             A = HEPATITIS
%
% The hepatitis database from UCI to predict if the patient will live or
% die.
%
%             A = HEPATITIS(VAL)
%
% By default objects with missing values are removed. When something else
% is desired, use one of the options in MISVAL.
%
% SEE ALSO <a href="http://37steps.com/prtools">PRTools Guide</a>, <a href="http://archive.ics.uci.edu/ml/">UCI Website</a>
% PRTOOLS, DATASETS, MISVAL

% Copyright: R.P.W. Duin, r.p.w.duin@37steps.com

function a = hepatitis(val)

if nargin<1
  val = 'remove';
end

a = pr_loadmatfile;
if isempty(a)
  opt.delimeter = ' ';
  opt.labfeat   = 1;
  opt.featnames = {'age' 'sex' 'steroid' 'antivirals' 'fatigue' 'malaise' ...
    'anorexia' 'liver big' 'liver firm' 'spleen palpable' 'spiders' ...
    'ascites' 'varices' 'bilirubin' 'alk phosphate' 'sgot' 'albumin' ...
    'protime' 'histology'};
  opt.classnames = {'die' 'live'};
  opt.desc = 'The hepatitis database from UCI to predict if the patient will live or die.';
  user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/hepatitis/';
  opt.dsetname = 'Hepatitis Data Set';
  a = pr_download('http://prtools.tudelft.nl/prdatasets/hepatitis.dat',[],opt);
end
a = misval(a,val);
