Open
Description
I'd like to use weighted distance function with Breeze. However, it is not easy for me to implemet them. If we want to implement like squaredDistance
, we need the three parameters version of ZippedValues
trait.
- weighted euclidean distance
- weighted cosine distance
- weighted tanimoto distance
and so on
I tried to implement a sample weighted distance function like below:
A weighted Euclidean distance function implementation
https://gist.github.com/yu-iskw/4e0d3a2f999effbcf640
But it seems that there are things we can't do.
- Take parameters as the combination of
DenseVector
andSparseVector
- Can not use
Int
,Float
andLong
type excludeDouble
in elements ofDenseVector
andSparseVector
.
If anyone have any good idea about implementing them, could you teach me ?
And should we make them in the first place?