Changeset 125


Ignore:
Timestamp:
03/15/18 23:07:41 (7 years ago)
Author:
bduin
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • prdatasets/wine.m

    r122 r125  
    1414function a = wine
    1515
    16 prdatasets(mfilename,1,'http://prtools.org/prdatasets/wine.dat');
     16url = 'http://prtools.org/prdatasets/wine.dat';
     17%prdatasets(mfilename,1,'http://prtools.org/prdatasets/wine.dat');
    1718user.desc = 'These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars.  The analysis determined the quantities of 13 constituents found in each of the three types of wines.';
    1819user.link = '';
    19 
    20 a = load('wine.dat');
    21 a = pr_dataset(a(:,2:end),a(:,1));
    22 a = setname(a,'Wine recognition data');
    23 a = setlablist(a,char('cultivar 1','cultivar 2','cultivar 3'));
    24 a = setfeatlab(a,char(...
     20opt.user = user;
     21opt.labfeat = 1;
     22opt.featnames = char(...
    2523        'alcohol', ...
    2624        'malic acid', ...
    2725        'ash', ...
    28         'alcalinity of ash', ...
    29         'magnesium', ...
    30         'total phenols', ...
    31         'flavanoids', ...
    32         'nonflavanoid phenols', ...   
    33         'proanthocyanine', ...   
    34         'color intensity', ...       
    35         'hue', ...   
    36         'OD280/OD315 of diluted wines', ...       
    37         'proline'));
    38 a = setuser(a,user);
     26        'alcalinity of ash', ...
     27        'magnesium', ...
     28        'total phenols', ...
     29        'flavanoids', ...
     30        'nonflavanoid phenols', ...   
     31        'proanthocyanine', ...   
     32        'color intensity', ...       
     33        'hue', ...   
     34        'OD280/OD315 of diluted wines', ...       
     35        'proline');
     36a = pr_download(url,[],opt);
    3937
     38% %a = load('wine.dat');
     39% %a = pr_dataset(a(:,2:end),a(:,1));
     40% a = feat2lab(a,1);
     41% a = setname(a,'Wine recognition data');
     42% a = setlablist(a,char('cultivar 1','cultivar 2','cultivar 3'));
     43% a = setfeatlab(a,char(...
     44%         'alcohol', ...
     45%         'malic acid', ...
     46%         'ash', ...
     47%       'alcalinity of ash', ...
     48%       'magnesium', ...
     49%       'total phenols', ...
     50%       'flavanoids', ...
     51%       'nonflavanoid phenols', ...   
     52%       'proanthocyanine', ...   
     53%       'color intensity', ...       
     54%       'hue', ...   
     55%       'OD280/OD315 of diluted wines', ...       
     56%         'proline'));
     57% a = setuser(a,user);
     58
Note: See TracChangeset for help on using the changeset viewer.