Commit f4bd1669 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX/FEAT] Order 2 improvement

parent e42661a8
...@@ -5,7 +5,7 @@ cabal-version: 1.12 ...@@ -5,7 +5,7 @@ cabal-version: 1.12
-- see: https://github.com/sol/hpack -- see: https://github.com/sol/hpack
name: gargantext name: gargantext
version: 0.0.6.9.9.6 version: 0.0.6.9.9.6
synopsis: Search, map, share synopsis: Search, map, share
description: Please see README.md description: Please see README.md
category: Data category: Data
......
...@@ -204,7 +204,7 @@ logDistributional' n m' = trace ("logDistributional'") result ...@@ -204,7 +204,7 @@ logDistributional' n m' = trace ("logDistributional'") result
-- m_{i,j} = 0 if n_{i,j} = 0 or i = j, -- m_{i,j} = 0 if n_{i,j} = 0 or i = j,
-- m_{i,j} = log(to * n_{i,j} / s_{i,j}) otherwise. -- m_{i,j} = log(to * n_{i,j} / s_{i,j}) otherwise.
mi = (.*) (matrixEye n) mi = (.*) (matrixEye n)
(map (lift1 (\x -> cond (x == 0) 0 (log (x * to)))) ((./) m ss)) (map (lift1 (\x -> cond (x == 0) 0 (log (1 + x * to)))) ((./) m ss))
-- mi_nnz :: Int -- mi_nnz :: Int
-- mi_nnz = flip indexArray Z . run $ -- mi_nnz = flip indexArray Z . run $
-- foldAll (+) 0 $ map (\a -> ifThenElse (abs a < 10^(-6 :: Exp Int)) 0 1) mi -- foldAll (+) 0 $ map (\a -> ifThenElse (abs a < 10^(-6 :: Exp Int)) 0 1) mi
......
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