I'm using the clustering module in python's scikit learn, and I'd like to use a Normalized Euclidean Distance. There is no built-in distance for this (that i know of) Here's a list.
So, I want to implement my own Normalized Euclidean Distance using a callable. The function is part of my
cluster = DBSCAN(eps=1.0, min_samples=1,metric = distance.normalized_euclidean, SD = stdv)
TypeError: __init__() got an unexpected keyword argument 'SD'
Any further parameters are passed directly to the distance function.
You can use a lambda function as metric which takes two input arrays:
cluster = DBSCAN(eps=1.0, min_samples=1,metric=lambda X, Y: distance.normalized_euclidean(X, Y, SD=stdv))