Wolfram Computation Meets Knowledge

Sample Data: Car Evaluation

Predicting car acceptability by attribute.

The Car Evaluation Database was created to test a model of hierarchical decision making. The model consists of three categories; price, technical features and comfort. Price is defined by purchase price, and maintenance costs. Technical features are defined by safety and comfort. Comfort can be further defined by the number doors, passenger capacity and cargo capacity. The goal was to predict the acceptability of a car based on these input attributes.

Examples

Basic Examples

Retrieve the resource:

In[1]:=
ResourceObject["Sample Data: Car Evaluation"]
Out[1]=

Retrieve the default content:

In[2]:=
ResourceData["Sample Data: Car Evaluation"]
Out[2]=

Analysis

Shuffle the data randomly:

In[3]:=
r = RandomSample[ResourceData["Sample Data: Car Evaluation"]]
Out[3]=

Create a training dataset using 80% of the original dataset:

In[4]:=
training = r[[;; Round[Times[Length[r], .8]]]]
Out[4]=

Create a testing dataset using the remaining 20% of the original dataset:

In[5]:=
testing = r[[Round[Times[Length[r], .8]] + 1 ;;]]
Out[5]=

Train a classifier:

In[6]:=
c = Classify[training -> "Acceptability"]
Out[6]=

Obtain general information about the classifier:

In[7]:=
ClassifierInformation[c]
Out[7]=

Test the classifier:

In[8]:=
cm = ClassifierMeasurements[c, testing -> "Acceptability"]
Out[8]=

Visualize the accuracy of the classifier:

In[9]:=
cm["ConfusionMatrixPlot"]
Out[9]=

Wolfram Research, "Sample Data: Car Evaluation" from the Wolfram Data Repository (2017) 

License Information

Creative Commons Public Domain Mark

Data Resource History

Source Metadata

Data Downloads

Publisher Information