Challenge

Project 2

Project_02:Implement Clustering and then predict the class of car from “Car dataset”.

Attributes imformation:

1.symboling: -3, -2, -1, 0, 1, 2, 3

2.normalized-losses: continuous from 65 to 256

3.make: alfa-romero, audi, bmw, chevrolet, dodge, honda, isuzu, jaguar, mazda, mercedes-benz, mercury, mitsubishi, nissan, peugot, plymouth, porsche, renault, saab, subaru, toyota, volkswagen, volvo.

4.fuel-type: diesel, gas

5.aspiration: std, turbo

6.num-of-doors: four, two

7.body-style: hardtop, wagon, sedan, hatchback, convertible

8.drive-wheels: 4wd, fwd, rwd

9.engine-location: front, rear

10.wheel-base: continuous from 86.6 120.9

11.length: continuous from 141.1 to 208.1

12.width: continuous from 60.3 to 72.3

13.height: continuous from 47.8 to 59.8

14.curb-weight: continuous from 1488 to 4066

15.engine-type: dohc, dohcv, l, ohc, ohcf, ohcv, rotor

16.num-of-cylinders: eight, five, four, six, three, twelve, two

17.engine-size: continuous from 61 to 326

18.fuel-system: 1bbl, 2bbl, 4bbl, idi, mfi, mpfi, spdi, spfi

19.bore: continuous from 2.54 to 3.94

20.stroke: continuous from 2.07 to 4.17

21.compression-ratio: continuous from 7 to 23

22.horsepower: continuous from 48 to 288

23.peak-rpm: continuous from 4150 to 6600

24.city-mpg: continuous from 13 to 49

25.highway-mpg: continuous from 16 to 54

26.price: continuous from 5118 to 45400.

Conclusion :

  • from above table,
  • For Knn classifier, the gap between train and test score is very less as compare to all other model.so Knn is performing very well.
  • For logistic regression & random forest, gap between train and test is slightly more as compare to Knn.

The output of the code will be the silhouette coefficient, the Davies-Bouldin index, and the accuracy of the classifier. The results will vary depending on the hyperparameters that are used.

In general, clustering is a good choice for clustering tasks. However, it is important to note that the performance of the clustering model can be sensitive to the choice of features and the hyperparameters.

The silhouette coefficient is a measure of how well each data point is assigned to its cluster. A high silhouette coefficient indicates that the data points are well-assigned to their clusters. The Davies-Bouldin index is a measure of the cluster separation. A low Davies-Bouldin index indicates that the clusters are well-separated.

The accuracy of the classifier is a measure of how well the classifier can predict the class of car for each cluster. A high accuracy indicates that the classifier is able to predict the class of car for most of the data points.

The clustering model can be used to identify the different types of cars that are available in the market. The classifier can be used to predict the class of car for a new data point. This information can be used to help businesses make decisions about their products and services.

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.