source: prdatasets/wine.m @ 135

Last change on this file since 135 was 132, checked in by bduin, 5 years ago
File size: 1.8 KB
RevLine 
[80]1%WINE Wine recognition dataset 178 objects with 13 features in 3 classes
2%
3%       A = WINE
4%
5% Load the dataset in A. This dataset is taken from the UCI
6% Machine Learning Repository, //www.ics.uci.edu/~mlearn/MLRepository.html.
7%
8% See also DATASETS, PRDATASETS
9
[132]10% Copyright: R.P.W. Duin
[80]11% Faculty EWI, Delft University of Technology
12% P.O. Box 5031, 2600 GA Delft, The Netherlands
13
14function a = wine
15
[127]16url = 'http://prtools.tudelft.nl/prdatasets/wine.dat';
17%prdatasets(mfilename,1,'http://prtools.tudelft.nl/prdatasets/wine.dat');
[80]18user.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.';
19user.link = '';
[125]20opt.user = user;
21opt.labfeat = 1;
22opt.featnames = char(...
[80]23        'alcohol', ...
24        'malic acid', ...
25        'ash', ...
[125]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);
[80]37
[125]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 TracBrowser for help on using the repository browser.