Comparing with True Rock Types
rock_types = pd.read_csv('data/rock_types.csv')
plt.figure(figsize=(10, 6))
for rock_type in rock_types['rock_type'].unique():
data_pca_type = data_pca[rock_types['rock_type'] == rock_type]
plt.scatter(data_pca_type[:, 0], data_pca_type[:, 1], label=rock_type)
plt.xlabel('First Principal Component')
plt.ylabel('Second Principal Component')
plt.title('True Rock Types')
plt.legend()
plt.show()
Does your clustering method match the true rock types?