Challenge

Project 2

Aim :

  • To implement clustering using an unsupervised algorithm on the car dataset
  • Train a supervised model from the results obtained to predict the class of the cars

Dataset :

The dataset is about cars from 1985, It consists of:

Number of Instances: 205

Number of Attributes: 26 total

  • 15 continuous
  • 1 integer
  • 10 nominal

The following data was cleaned and feature selection and feature engineering were performed and we ended up with

Number of Instances: 201

Number of Attributes: 21

Methods :

Clustering

Clustering is performed using the KMeans algorithm, to find the right amount of clusters, the elbow plot is plotted

From the above plot, we can see that after 7 clusters the change in Inertia is very less, hence we go with 7 clusters

Results obtained from clustering

Cluster plot with respect to horsepower

Cluster plot with respect to engine size

Classification using SVM

Now the output from the clustering is used to train a supervised model, we use the support vector machine algorithm(SVM) for this purpose

Results obtained from SVM

Plot between actual and predicted values

The confusion matrix is also visualized

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.