Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
147
Issues
147
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
958e43fb
Commit
958e43fb
authored
Oct 27, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Distances] Conditional clearer
parent
a7462f0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Conditional.hs
...rgantext/Core/Methods/Distances/Accelerate/Conditional.hs
+4
-4
Utils.hs
src/Gargantext/Core/Methods/Matrix/Accelerate/Utils.hs
+1
-1
No files found.
src/Gargantext/Core/Methods/Distances/Accelerate/Conditional.hs
View file @
958e43fb
...
...
@@ -46,10 +46,10 @@ import qualified Gargantext.Prelude as P
-- Conditional metric is an absolute metric which reflects
-- interactions of 2 terms in the corpus.
measureConditional
::
Matrix
Int
->
Matrix
Double
--measureConditional m = run (matMiniMax $ matProba (dim m) $ map fromIntegral $ use m
)
measureConditional
m
=
run
$
matProba
(
dim
m
)
$
map
fromIntegral
$
use
m
measureConditional
m
=
run
$
zipWith
(
/
)
m'
(
matSumCol
d
m'
)
where
m'
=
map
fromIntegral
(
use
m
)
d
=
dim
m
-- *** Conditional distance (advanced)
...
...
src/Gargantext/Core/Methods/Matrix/Accelerate/Utils.hs
View file @
958e43fb
...
...
@@ -108,7 +108,7 @@ matSumCol' m = run $ matSumCol n m'
-- 0.3333333333333333, 0.3333333333333333, 0.3333333333333333,
-- 0.5833333333333334, 0.5333333333333333, 0.5]
matProba
::
Dim
->
Acc
(
Matrix
Double
)
->
Acc
(
Matrix
Double
)
matProba
r
mat
=
zipWith
(
/
)
mat
(
matSumCol
r
mat
)
matProba
d
mat
=
zipWith
(
/
)
mat
(
matSumCol
d
mat
)
-- | Diagonal of the matrix
--
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment