Challenge

Unsupervised Learning - Kmeans Week 11 Challenge

1.How does similarity is calculated if data is categorical in nature

For categorical data it is better to use the hamming distance. But K-means work only on Euclidean distance.

So, it is better to classify the categorical data using one hot encoding and removing one extra column of each feature (Dummy Variable). Thus all the columns are binary in nature which gives the same sense as of hamming distance.

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.