%WINE Wine recognition dataset 178 objects with 13 features in 3 classes
%
%	A = WINE
%
% Load the dataset in A. This dataset is taken from the UCI
% Machine Learning Repository, //www.ics.uci.edu/~mlearn/MLRepository.html.
%
% See also DATASETS, PRDATASETS

% Copyright: R.P.W. Duin, r.p.w.duin@prtools.org
% Faculty EWI, Delft University of Technology
% P.O. Box 5031, 2600 GA Delft, The Netherlands

function a = wine

url = 'http://prtools.org/prdatasets/wine.dat';
%prdatasets(mfilename,1,'http://prtools.org/prdatasets/wine.dat');
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.';
user.link = '';
opt.user = user;
opt.labfeat = 1;
opt.featnames = char(...
        'alcohol', ...
        'malic acid', ...
        'ash', ...
        'alcalinity of ash', ...
        'magnesium', ...
        'total phenols', ...
        'flavanoids', ...
        'nonflavanoid phenols', ...    
        'proanthocyanine', ...    
        'color intensity', ...        
        'hue', ...    
        'OD280/OD315 of diluted wines', ...        
        'proline');
a = pr_download(url,[],opt);

% %a = load('wine.dat');
% %a = pr_dataset(a(:,2:end),a(:,1));
% a = feat2lab(a,1);
% a = setname(a,'Wine recognition data');
% a = setlablist(a,char('cultivar 1','cultivar 2','cultivar 3'));
% a = setfeatlab(a,char(...
%         'alcohol', ...
%         'malic acid', ...
%         'ash', ...
% 	'alcalinity of ash', ...
% 	'magnesium', ...
% 	'total phenols', ...
% 	'flavanoids', ...
% 	'nonflavanoid phenols', ...    
% 	'proanthocyanine', ...    
% 	'color intensity', ...        
% 	'hue', ...    
% 	'OD280/OD315 of diluted wines', ...        
%         'proline'));
% a = setuser(a,user);

