As I know, K-means clustering in python uses Eculdian distance as a cost function. I saw the definition of it in _kmeans.py in python. but I do not know where I can change this cost function. is it possible to change it? I want to use the BD metric (bjontegaard metric) as a cost function? how can I do this? my input data to K-means is an array of RD curves and I want to cluster these RD curves based on BD metric instead of Euclidean distance. could you please help me with this issue? where is the cost function defined in kmeans function?