larsga / Duke

Duke is a fast and flexible deduplication engine written in Java
Apache License 2.0
614 stars 194 forks source link

Problem with NumericComparator #216

Closed iDmple closed 8 years ago

iDmple commented 8 years ago

Hi Lars,

I'm not sure whether the NumericComparator is made to be used in this case, but it makes the final probability negative:

---FloorNumber '-2' ~ '-1': 2.0 (prob 1.1) Result: 0.037589897356784224 -> -0.7532754191891153

Here is my property:

FloorNumber no.priv.garshol.duke.comparators.NumericComparator 0.3 0.65

What do you advise in this case?

Best regards

larsga commented 8 years ago

This looks very strange, but it's probably a bug. Let me investigate a little and see if I can fix it.

I'm not sure if this is the right comparator for your purposes, though. How different is floor "-2" from floor "2"? Should "1" ~ "2" and "8" ~ "16" compare as equally similar?

I'll fix the bug anyway.

iDmple commented 8 years ago

Hi,

indeed it isn't the right comparator for me. I need something like |v1-v2|, but for now I just used the exact comparator and it works as well. I might implement some more comparators in the future if needed. I'll share them with you.

larsga commented 8 years ago

If you do implement more comparators then pull requests are very welcome. :)

larsga commented 8 years ago

Fixed by commit 033661fa575ec4536c47fe96643813265a942979

iDmple commented 8 years ago

Many thanks!

On Oct 12, 2015, 14:33, at 14:33, Lars Marius Garshol notifications@github.com wrote:

Closed #216.


Reply to this email directly or view it on GitHub: https://github.com/larsga/Duke/issues/216#event-432888764