Implementation Of Classification Algorithms

This data is obtained from UCI Machine learning repository. The purpose of the analysis is to evaluate the Classification Algorithms and safety standard of the cars based on certain parameters and classify them. The detailed description of the dataset is provided below as given on the website:

  1. Title: Car Evaluation Database
  2. Relevant Information Paragraph

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.). The model evaluates cars according to the following concept structure:

  • CAR                 car acceptability
  • PRICE              overall price
  • Buying             buying price
  • maint                price of the maintenance
  • TECH               technical characteristics
  • COMFORT      comfort
  • Doors              number of doors
  • Person’s           capacity in terms of persons to carry
  • lug_boot           the size of luggage boot
  • Safety              estimated safety of the car

Input attributes are printed in lowercase. Besides the target concept (CAR), the model includes three intermediate concepts:    PRICE, TECH, and COMFORT. Every concept is in the original model related to its lower level descendants by a set of examples (for these examples sets see

The Car Evaluation Database contains examples with the structural information removed, i.e., directly relates CAR to the six input attributes: buying, maint, doors, persons, lug_boot, and safety. Because of the known underlying concept structure, this database may be particularly useful for testing constructive induction and structure discovery methods.

  1. Number of Instances: 1728 (instances completely cover the attribute space)
  2. Number of Attributes: 6
  3. Attribute Values:
    Buying        v-high, high, med, low
    maint          v-high, high, med, low
    Doors         2, 3, 4, 5-more
    Persons      2, 4, more
    lug_boot     small, med, big
    Safety         low, med, high
  1. Missing Attribute Values: none
  2. Class Distribution (number of instances per class)

1. Load the data

##     buying    maint    doors   persons      lug_boot    safety class
## 1   vhigh       vhigh     2               2               small        low unacc
## 2  vhigh        vhigh     2              2               small         med unacc
## 3  vhigh        vhigh     2              2               small         high unacc
## 4  vhigh        vhigh     2              2               med           low unacc
## 5  vhigh        vhigh      2             2               med           med unacc
## 6 vhigh         vhigh      2             2               med           high unacc 

2. Exploratory Data Analysis

3) Classification Analysis

Linear Classification


You might also like More from author