ym001 / distancia

The DistanceMetrics package is a comprehensive Python library designed to compute a wide variety of distance metrics between two vectors, set, matrix or sequences. This package includes implementations of several well-known distance metrics, each providing a unique measure of dissimilarity or similarity between data points.
https://pypi.org/project/distancia/
Other
1 stars 0 forks source link

Error in formula for Ochiai distance #1

Open veljanin opened 1 week ago

veljanin commented 1 week ago

I've noticed that Ochiai returns 1 every single time This is due to the following set conversion:

set1=set(list1)
set2=set(list2)

If you convert to list instead, you would get the correct result. Not sure what is the right process for PR and contributions...

ym001 commented 1 week ago

Thank you very much for bringing this to my attention and for your detailed feedback!

I’ve entirely re-coded the Ochiai class to make it more robust and versatile, addressing the issue you encountered. The new implementation now correctly handles both list and set inputs, ensuring consistent and accurate results. I really appreciate your contribution, as it helped identify and resolve this problem effectively.

Please feel free to review the updated code, and let me know if you notice any further issues or have additional suggestions. Thanks again for your valuable input!