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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
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
e3eb8220
Commit
e3eb8220
authored
5 years ago
by
qlobbe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the artifacts
parent
729de971
No related merge requests found
Pipeline
#606
failed with stage
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
36 deletions
+33
-36
AdaptativePhylo.hs
src/Gargantext/Viz/AdaptativePhylo.hs
+1
-1
PhyloExport.hs
src/Gargantext/Viz/Phylo/PhyloExport.hs
+2
-1
TemporalMatching.hs
src/Gargantext/Viz/Phylo/TemporalMatching.hs
+30
-34
No files found.
src/Gargantext/Viz/AdaptativePhylo.hs
View file @
e3eb8220
...
...
@@ -127,7 +127,7 @@ defaultConfig =
,
phyloLevel
=
2
,
phyloProximity
=
WeightedLogJaccard
10
0
0.1
,
phyloSynchrony
=
ByProximityDistribution
0
,
phyloQuality
=
Quality
1
1
,
phyloQuality
=
Quality
0.2
4
,
timeUnit
=
Year
3
1
5
,
contextualUnit
=
Fis
1
5
,
exportLabel
=
[
BranchLabel
MostInclusive
2
,
GroupLabel
MostEmergentInclusive
2
]
...
...
This diff is collapsed.
Click to expand it.
src/Gargantext/Viz/Phylo/PhyloExport.hs
View file @
e3eb8220
...
...
@@ -106,7 +106,8 @@ groupToTable fdt g = H.Table H.HTable
<>
(
pack
$
show
(
fst
$
g
^.
phylo_groupPeriod
))
<>
(
fromStrict
" , "
)
<>
(
pack
$
show
(
snd
$
g
^.
phylo_groupPeriod
))
<>
(
fromStrict
" ) "
))]]
<>
(
fromStrict
" ) "
)
<>
(
pack
$
show
(
getGroupId
g
)))]]
--------------------------------------
branchToDotNode
::
PhyloBranch
->
Dot
DotId
...
...
This diff is collapsed.
Click to expand it.
src/Gargantext/Viz/Phylo/TemporalMatching.hs
View file @
e3eb8220
...
...
@@ -129,8 +129,8 @@ makePairs' ego candidates periods pointers fil thr prox docs =
True
->
[]
False
->
toLazyPairs
pointers
fil
thr
prox
lastPrd
-- | at least on of the pair candidates should be from the last added period
--
$ filter (\(g,g') -> ((g ^. phylo_groupPeriod) == lastPrd)
--
|| ((g' ^. phylo_groupPeriod) == lastPrd))
$
filter
(
\
(
g
,
g'
)
->
((
g
^.
phylo_groupPeriod
)
==
lastPrd
)
||
((
g'
^.
phylo_groupPeriod
)
==
lastPrd
))
$
listToKeys
$
filter
(
\
g
->
(
g
^.
phylo_groupPeriod
==
lastPrd
)
||
((
toProximity
docs
prox
ego
ego
g
)
>=
thr
))
candidates
...
...
@@ -193,14 +193,8 @@ getNextPeriods fil max' pId pIds =
ToParents
->
take
max'
$
(
reverse
.
fst
)
$
splitAt
(
elemIndex'
pId
pIds
)
pIds
getCandidates
::
Filiation
->
PhyloGroup
->
[[
PhyloGroup
]]
->
[[
PhyloGroup
]]
getCandidates
fil
ego
targets
=
case
fil
of
ToChilds
->
targets'
ToParents
->
reverse
targets'
where
targets'
::
[[
PhyloGroup
]]
targets'
=
getCandidates
::
PhyloGroup
->
[[
PhyloGroup
]]
->
[[
PhyloGroup
]]
getCandidates
ego
targets
=
map
(
\
groups'
->
filter
(
\
g'
->
(
not
.
null
)
$
intersect
(
ego
^.
phylo_groupNgrams
)
(
g'
^.
phylo_groupNgrams
)
)
groups'
)
targets
...
...
@@ -221,8 +215,8 @@ phyloBranchMatching frame periods proximity thr docs branch =
candidatesChi
=
map
(
\
prd'
->
findWithDefault
[]
prd'
branch'
)
periodsChi
docsPar
=
filterDocs
docs
([
prd
]
++
periodsPar
)
docsChi
=
filterDocs
docs
([
prd
]
++
periodsChi
)
egos
=
map
(
\
ego
->
phyloGroupMatching
(
getCandidates
ToParents
ego
candidatesPar
)
ToParents
proximity
docsPar
thr
$
phyloGroupMatching
(
getCandidates
ToChilds
ego
candidatesChi
)
ToChilds
proximity
docsChi
thr
ego
)
egos
=
map
(
\
ego
->
phyloGroupMatching
(
getCandidates
ego
candidatesPar
)
ToParents
proximity
docsPar
thr
$
phyloGroupMatching
(
getCandidates
ego
candidatesChi
)
ToChilds
proximity
docsChi
thr
ego
)
$
findWithDefault
[]
prd
branch'
egos'
=
egos
`
using
`
parList
rdeepseq
in
acc
++
egos'
)
[]
periods
...
...
@@ -360,10 +354,12 @@ temporalMatching phylo = updatePhyloGroups 1
(
getTimeFrame
$
timeUnit
$
getConfig
phylo
)
(
getPeriodIds
phylo
)
(
phylo
^.
phylo_timeDocs
)
[(
groups
,
True
)]
groups
-- | 1) for each group process an initial temporal Matching
groups
::
[
PhyloGroup
]
groups
=
phyloBranchMatching
(
getTimeFrame
$
timeUnit
$
getConfig
phylo
)
(
getPeriodIds
phylo
)
groups
::
[([
PhyloGroup
],
Bool
)]
groups
=
map
(
\
b
->
(
b
,(
length
$
nub
$
map
_phylo_groupPeriod
b
)
>=
(
_qua_minBranch
$
phyloQuality
$
getConfig
phylo
)))
$
groupsToBranches
$
fromList
$
map
(
\
g
->
(
getGroupId
g
,
g
))
$
phyloBranchMatching
(
getTimeFrame
$
timeUnit
$
getConfig
phylo
)
(
getPeriodIds
phylo
)
(
phyloProximity
$
getConfig
phylo
)
(
getThresholdInit
$
phyloProximity
$
getConfig
phylo
)
(
phylo
^.
phylo_timeDocs
)
(
traceTemporalMatching
$
getGroupsFromLevel
1
phylo
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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