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
154
Issues
154
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
bf1098d5
Commit
bf1098d5
authored
Sep 17, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DOC] fix haddock errors
parent
c88689c3
Pipeline
#1074
failed with stage
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
28 deletions
+24
-28
Ngrams.hs
src/Gargantext/API/Ngrams.hs
+2
-2
Public.hs
src/Gargantext/API/Public.hs
+1
-1
Learn.hs
src/Gargantext/Core/Text/List/Learn.hs
+3
-6
Metrics.hs
src/Gargantext/Core/Text/Metrics.hs
+11
-12
Matrice.hs
src/Gargantext/Core/Viz/Graph/Distances/Matrice.hs
+2
-2
PhyloExport.hs
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
+1
-1
PhyloTools.hs
src/Gargantext/Core/Viz/Phylo/PhyloTools.hs
+2
-2
TemporalMatching.hs
src/Gargantext/Core/Viz/Phylo/TemporalMatching.hs
+1
-1
Metrics.hs
src/Gargantext/Database/Action/Metrics.hs
+1
-1
No files found.
src/Gargantext/API/Ngrams.hs
View file @
bf1098d5
...
...
@@ -854,8 +854,8 @@ ngramsStatePatchConflictResolution
->
ConflictResolutionNgramsPatch
ngramsStatePatchConflictResolution
_ngramsType
_nodeId
_ngramsTerm
=
(
ours
,
(
const
ours
,
ours
),
(
False
,
False
))
--
^------^------- they mean
that Mod has always priority.
--(True, False) <- would mean priority to the left (same as ours).
--
(False, False) mean here
that Mod has always priority.
--
(True, False) <- would mean priority to the left (same as ours).
-- undefined {- TODO think this through -}, listTypeConflictResolution)
...
...
src/Gargantext/API/Public.hs
View file @
bf1098d5
...
...
@@ -50,7 +50,7 @@ selectPublic :: HasNodeError err
=>
Cmd
err
[(
Node
HyperdataFolder
,
Maybe
Int
)]
selectPublic
=
selectPublicNodes
--
|
For tests only
-- For tests only
-- pure $ replicate 6 defaultPublicData
filterPublicDatas
::
[(
Node
HyperdataFolder
,
Maybe
Int
)]
->
[(
Node
HyperdataFolder
,
[
NodeId
])]
...
...
src/Gargantext/Core/Text/List/Learn.hs
View file @
bf1098d5
...
...
@@ -97,7 +97,7 @@ grid s e tr te = do
->
m
(
Score
,
Model
)
grid'
x
y
tr'
te'
=
do
model''
<-
liftBase
$
trainList
x
y
tr'
let
model'
=
ModelSVM
model''
(
Just
x
)
(
Just
y
)
...
...
@@ -114,10 +114,10 @@ grid s e tr te = do
$
List
.
concat
$
map
(
\
(
k
,
vs
)
->
zip
(
repeat
k
)
vs
)
$
Map
.
toList
t
res'
<-
liftBase
$
predictList
m
toGuess
pure
$
score''
$
score'
$
List
.
zip
res
res'
score
<-
mapM
(
getScore
model'
)
te'
pure
(
mean
score
,
model'
)
...
...
@@ -131,6 +131,3 @@ grid s e tr te = do
--fp <- saveFile (ModelSVM model')
--save best result
pure
$
snd
<$>
r
src/Gargantext/Core/Text/Metrics.hs
View file @
bf1098d5
...
...
@@ -35,7 +35,7 @@ import qualified Data.Map as Map
import
qualified
Data.Vector.Storable
as
Vec
type
Graph
ListSize
=
Int
type
Map
ListSize
=
Int
type
InclusionSize
=
Int
{-
...
...
@@ -64,8 +64,8 @@ data Scored ts = Scored
localMetrics'
::
Ord
t
=>
Map
(
t
,
t
)
Int
->
Map
t
(
Vec
.
Vector
Double
)
localMetrics'
m
=
Map
.
fromList
$
zipWith
(
\
(
_
,
t
)
(
inc
,
spe
)
->
(
t
,
Vec
.
fromList
[
inc
,
spe
]))
(
Map
.
toList
fi
)
scores
(
Map
.
toList
fi
)
scores
where
(
ti
,
fi
)
=
createIndices
m
(
is
,
ss
)
=
incExcSpeGen
$
cooc2mat
ti
m
...
...
@@ -73,8 +73,7 @@ localMetrics' m = Map.fromList $ zipWith (\(_,t) (inc,spe) -> (t, Vec.fromList [
$
DAA
.
run
$
DAA
.
zip
(
DAA
.
use
is
)
(
DAA
.
use
ss
)
-- TODO Code to be remove below
-- TODO Code to be removed below
-- TODO in the textflow we end up needing these indices , it might be
-- better to compute them earlier and pass them around.
scored'
::
Ord
t
=>
Map
(
t
,
t
)
Int
->
[
Scored
t
]
...
...
@@ -87,20 +86,20 @@ scored' m = zipWith (\(_,t) (inc,spe) -> Scored t (inc) (spe)) (Map.toList fi) s
$
DAA
.
zip
(
DAA
.
use
is
)
(
DAA
.
use
ss
)
takeScored
::
Ord
t
=>
Graph
ListSize
->
InclusionSize
->
Map
(
t
,
t
)
Int
->
([
t
],[
t
])
takeScored
::
Ord
t
=>
Map
ListSize
->
InclusionSize
->
Map
(
t
,
t
)
Int
->
([
t
],[
t
])
takeScored
listSize
incSize
=
both
(
map
_scored_terms
)
.
linearTakes
listSize
incSize
_scored_speGen
_scored_incExc
.
takeLinear
listSize
incSize
_scored_speGen
_scored_incExc
.
scored
-- | Filter Scored data
-- >>>
linearTakes
2 3 fst snd $ Prelude.zip ([1..10] :: [Int]) (reverse $ [1..10] :: [Int])
-- >>>
takeLinear
2 3 fst snd $ Prelude.zip ([1..10] :: [Int]) (reverse $ [1..10] :: [Int])
-- [(3,8),(6,5)]
linearTakes
::
(
Ord
b1
,
Ord
b2
)
=>
Graph
ListSize
->
InclusionSize
takeLinear
::
(
Ord
b1
,
Ord
b2
)
=>
Map
ListSize
->
InclusionSize
->
(
a
->
b2
)
->
(
a
->
b1
)
->
[
a
]
->
([
a
],[
a
])
linearTakes
mls
incSize
speGen
incExc
=
(
List
.
splitAt
mls
)
takeLinear
mls
incSize
speGen
incExc
=
(
List
.
splitAt
mls
)
.
List
.
concat
.
map
(
take
$
round
$
(
fromIntegral
mls
::
Double
)
...
...
src/Gargantext/Core/Viz/Graph/Distances/Matrice.hs
View file @
bf1098d5
...
...
@@ -245,8 +245,8 @@ conditional' m = ( run $ ie $ map fromIntegral $ use m
-- \[N_{m} = \sum_{i,i \neq i}^{m} \sum_{j, j \neq j}^{m} S_{ij}\]
--
distributional
::
Matrix
Int
->
Matrix
Double
distributional
m
=
run
-- $ matMiniMax
$
diagNull
n
distributional
m
=
-- run {- $ matMiniMax -}
run
$
diagNull
n
$
rIJ
n
$
filterWith
0
100
$
filter'
0
...
...
src/Gargantext/Core/Viz/Phylo/PhyloExport.hs
View file @
bf1098d5
...
...
@@ -247,7 +247,7 @@ exportToDot phylo export =
toDotEdge
(
groupIdToDotId
k
)
(
groupIdToDotId
k'
)
""
GroupToAncestor
)
$
mergeAncestors
$
export
^.
export_groups
--
|
10) create the edges between the periods
-- 10) create the edges between the periods
_
<-
mapM
(
\
(
prd
,
prd'
)
->
toDotEdge
(
periodIdToDotId
prd
)
(
periodIdToDotId
prd'
)
""
PeriodToPeriod
)
$
nubBy
(
\
combi
combi'
->
fst
combi
==
fst
combi'
)
$
listToCombi'
$
getPeriodIds
phylo
...
...
src/Gargantext/Core/Viz/Phylo/PhyloTools.hs
View file @
bf1098d5
...
...
@@ -417,13 +417,13 @@ mergeMeta bId groups =
groupsToBranches
::
Map
PhyloGroupId
PhyloGroup
->
[[
PhyloGroup
]]
groupsToBranches
groups
=
-- | run the related component algorithm
{- run the related component algorithm -}
let
egos
=
map
(
\
g
->
[
getGroupId
g
]
++
(
map
fst
$
g
^.
phylo_groupPeriodParents
)
++
(
map
fst
$
g
^.
phylo_groupPeriodChilds
)
++
(
map
fst
$
g
^.
phylo_groupAncestors
))
$
elems
groups
graph
=
relatedComponents
egos
-- | update each group's branch id
{- update each group's branch id -}
in
map
(
\
ids
->
let
groups'
=
elems
$
restrictKeys
groups
(
Set
.
fromList
ids
)
bId
=
mergeBranchIds
$
map
(
\
g
->
snd
$
g
^.
phylo_groupBranchId
)
groups'
...
...
src/Gargantext/Core/Viz/Phylo/TemporalMatching.hs
View file @
bf1098d5
...
...
@@ -343,7 +343,7 @@ toPhyloQuality beta freq branches =
groupsToBranches'
::
Map
PhyloGroupId
PhyloGroup
->
[[
PhyloGroup
]]
groupsToBranches'
groups
=
-- | run the related component algorithm
{- run the related component algorithm -}
let
egos
=
groupBy
(
\
gs
gs'
->
(
fst
$
fst
$
head'
"egos"
gs
)
==
(
fst
$
fst
$
head'
"egos"
gs'
))
$
sortOn
(
\
gs
->
fst
$
fst
$
head'
"egos"
gs
)
$
map
(
\
group
->
[
getGroupId
group
]
...
...
src/Gargantext/Database/Action/Metrics.hs
View file @
bf1098d5
...
...
@@ -48,7 +48,7 @@ getNgramsCooc cId maybeListId tabType maybeLimit = do
(
ngs'
,
ngs
)
<-
getNgrams
cId
maybeListId
tabType
let
take'
Nothing
xs
=
xs
take'
Nothing
xs
=
xs
take'
(
Just
n
)
xs
=
take
n
xs
lId
<-
defaultList
cId
...
...
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