[80] | 1 | %CAR 1728 objects with 6 features in 4 classes |
---|
| 2 | % |
---|
| 3 | % A = CAR |
---|
| 4 | % |
---|
| 5 | % The Car Evaluation Database was derived from a simple hierarchical |
---|
| 6 | % decision model originally developed for the demonstration of DEX (M. |
---|
| 7 | % Bohanec, V. Rajkovic: Expert system for decision making. Sistemica |
---|
| 8 | % 1(1), pp. 145-157, 1990.). All 6 features are nominal. |
---|
| 9 | % The instances completely cover the attribute space. |
---|
| 10 | function x = car |
---|
| 11 | |
---|
| 12 | prdatasets(mfilename,1,'http://prtools.org/prdatasets/car.data'); |
---|
| 13 | % for some mysterious reason it appeared to be necessary on my Windows 7 |
---|
| 14 | % system to repeat this command |
---|
| 15 | prdatasets(mfilename,1,'http://prtools.org/prdatasets/car.data'); |
---|
| 16 | user.desc = 'Car Evaluation Database was derived from a simple hierarchical decision model originally developed for the demonstration of DEX (M. Bohanec, V. Rajkovic: Expert system for decision making. Sistemica 1(1), pp. 145-157, 1990.).'; |
---|
| 17 | fl = {'buying price' 'maintenance price' 'nr of doors' 'nr of persons' 'luggage boot' 'safety'}; |
---|
| 18 | |
---|
| 19 | [a,strvals] = prreaddataset('car.data',ones(7,1)); |
---|
| 20 | labs = strvals{end}(a(:,end)); |
---|
| 21 | for i=1:6 |
---|
| 22 | featdom{i} = strvcat(strvals{i}'); |
---|
| 23 | end |
---|
[81] | 24 | x = pr_dataset(a(:,1:(end-1)), labs); |
---|
[80] | 25 | x = setfeatlab(x,fl); |
---|
| 26 | x = setfeatdom(x,featdom); |
---|
| 27 | x = setuser(x,user); |
---|
| 28 | x = setname(x,'Car'); |
---|
| 29 | |
---|
| 30 | return |
---|