HF RL Explorer

Task: Demonstrate Why K-Medoids Distance Measure is More Robust Than K-Means

Task: Demonstrate Why K-Medoids Distance Measure is More Robust Than K-Means: a task in Terminal-Lego-15k (Harbor dataset). Write a Python program that empirically demonstrates why the distance measure used in k-medoids (sum of absolute/pairwise distances) is more robust to outliers than the…

The task

Write a Python program that empirically demonstrates why the distance measure used in k-medoids (sum of absolute/pairwise distances) is more robust to outliers than the squared Euclidean distance used in k-means. Your program should illustrate the mathematical reasoning behind this property.

Part of PrimeIntellect/Terminal-Lego-15k.