Changeset 137 for prdatasets/diabetes.m


Ignore:
Timestamp:
12/18/19 15:46:35 (5 years ago)
Author:
bduin
Message:
 
Location:
prdatasets
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • prdatasets

    • Property svn:ignore
      •  

        old new  
        33*.data
        44*.asv
         5data
  • prdatasets/diabetes.m

    r127 r137  
    88% //www.ics.uci.edu/~mlearn/MLRepository.html
    99
    10 function x = diabetes
    11 
    12 prdatasets(mfilename,1,'http://prtools.tudelft.nl/prdatasets/diabetes.dat');
    13 user.desc='The Pima Indians Diabetes Database from UCI.';
    14 user.link = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/pima-indians-diabetes/';
    15 cl = {'present' 'absent'};
    16 fl = {'NumPregnancies' 'plasmaGlucose' 'diastolicBloodPr' ...
    17 'tricepsSkinfold' '2hrSerumInsulin' 'BodyMassIndex' ...
    18 'DiabetesPedigreeFn' 'Age'};
    19 
    20 a = load('diabetes.dat');
    21 x = pr_dataset(a(:,1:(end-1)),cl(a(:,end)+1));
    22 x = setfeatlab(x,fl);
    23 x = setname(x,'Diabetes');
    24 x = setuser(x,user);
     10function a = diabetes
     11 
     12a = pr_loadmatfile;
     13if isempty(a)
     14  opt.delimeter = ' ';
     15  opt.labfeat   = 9;
     16  opt.featnames = {'NumPregnancies' 'plasmaGlucose' 'diastolicBloodPr' ...
     17        'tricepsSkinfold' '2hrSerumInsulin' 'BodyMassIndex' ...
     18        'DiabetesPedigreeFn' 'Age'};
     19  opt.classnames = {'present' 'absent'};
     20  opt.link  = 'ftp://ftp.ics.uci.edu/pub/machine-learning-databases/pima-indians-diabetes/';
     21  opt.desc  = 'The Pima Indians Diabetes Database from UCI.';
     22  a = pr_download('http://prtools.tudelft.nl/prdatasets/diabetes.dat',[],opt);
     23end
    2524
    2625return
Note: See TracChangeset for help on using the changeset viewer.