Commit 01f84708 authored by david Chavalarias's avatar david Chavalarias

parameter change in the sensibility for WeightedLogSim and WeightedLogJaccard...

parameter change in the sensibility for WeightedLogSim and WeightedLogJaccard similarity measures to have continuous function in 0
parent 1a051cf1
......@@ -43,12 +43,12 @@ jaccard inter' union' = ((fromIntegral . length) $ inter') / ((fromIntegral . le
-- | Process the inverse sumLog
sumInvLog' :: Double -> Double -> [Double] -> Double
sumInvLog' s nb diago = foldl (\mem occ -> mem + (1 / (log (occ + s) / log (nb + s)))) 0 diago
sumInvLog' s nb diago = foldl (\mem occ -> mem + (1 / (log (occ + 1/s) / log (nb + 1/s)))) 0 diago
-- | Process the sumLog
sumLog' :: Double -> Double -> [Double] -> Double
sumLog' s nb diago = foldl (\mem occ -> mem + (log (occ + s) / log (nb + s))) 0 diago
sumLog' s nb diago = foldl (\mem occ -> mem + (log (occ + 1/s) / log (nb + 1/s))) 0 diago
weightedLogJaccard' :: Double -> Double -> Map Int Double -> [Int] -> [Int] -> Double
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment