Changeset 137 for prdatasets/wine.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/wine.m

    r132 r137  
    11%WINE Wine recognition dataset 178 objects with 13 features in 3 classes
    22%
    3 %       A = WINE
     3%  A = WINE
    44%
    55% Load the dataset in A. This dataset is taken from the UCI
     
    88% See also DATASETS, PRDATASETS
    99
    10 % Copyright: R.P.W. Duin
     10% Copyright: R.P.W. Duin, r.p.w.duin@37steps.com
    1111% Faculty EWI, Delft University of Technology
    1212% P.O. Box 5031, 2600 GA Delft, The Netherlands
     
    1414function a = wine
    1515
    16 url = 'http://prtools.tudelft.nl/prdatasets/wine.dat';
    17 %prdatasets(mfilename,1,'http://prtools.tudelft.nl/prdatasets/wine.dat');
    18 user.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.';
    19 user.link = '';
    20 opt.user = user;
    21 opt.labfeat = 1;
    22 opt.featnames = char(...
     16a = pr_loadmatfile;
     17if isempty(a)
     18  opt.delimeter = ',';
     19  opt.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.';
     20  opt.labfeat   = 1;
     21  opt.featnames = char(...
    2322        'alcohol', ...
    2423        'malic acid', ...
     
    3433        'OD280/OD315 of diluted wines', ...       
    3534        'proline');
    36 a = pr_download(url,[],opt);
    37 
    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 
     35  opt.classnames = {'cultivar 1','cultivar 2','cultivar 3'};
     36  opt.dsetname   = 'Wine recognition data';
     37  a = pr_download('http://prtools.tudelft.nl/prdatasets/wine.dat',[],opt);
     38end
Note: See TracChangeset for help on using the changeset viewer.