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
145
Issues
145
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
e5419936
Commit
e5419936
authored
Jun 09, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Map list automatic filtering] adding doc.
parent
541b5a3b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Metrics.hs
src/Gargantext/Text/Metrics.hs
+11
-10
No files found.
src/Gargantext/Text/Metrics.hs
View file @
e5419936
...
@@ -60,20 +60,21 @@ import GHC.Real (round)
...
@@ -60,20 +60,21 @@ import GHC.Real (round)
-- . fromIndex fi $ filterMat $ cooc2mat ti m
-- . fromIndex fi $ filterMat $ cooc2mat ti m
type
ListSize
=
Int
type
MapListSize
=
Int
type
BinSize
=
Double
type
SampleBins
=
Double
type
Clusters
=
Int
-- Map list creation
--
|
Map list creation
-- Kmean
split into 2
main clusters with Inclusion/Exclusion (relevance score)
-- Kmean
s split into (Clusters::Int)
main clusters with Inclusion/Exclusion (relevance score)
-- Sample the main cluster ordered by specificity/genericity in
s
parts
-- Sample the main cluster ordered by specificity/genericity in
(SampleBins::Double)
parts
-- each parts is then ordered by Inclusion/Exclusion
-- each parts is then ordered by Inclusion/Exclusion
-- take n scored terms in each parts where n *
s = l
-- take n scored terms in each parts where n *
SampleBins = MapListSize.
takeSome
::
Ord
t
=>
ListSize
->
BinSize
->
[
Scored
t
]
->
[
Scored
t
]
takeSome
::
Ord
t
=>
MapListSize
->
SampleBins
->
Clusters
->
[
Scored
t
]
->
[
Scored
t
]
takeSome
l
s
scores
=
L
.
take
l
takeSome
l
s
k
scores
=
L
.
take
l
$
takeSample
n
m
$
takeSample
n
m
$
splitKmeans
2
scores
$
splitKmeans
k
scores
where
where
--
(TODO: benchmark with accelerate-example kmeans version)
--
TODO: benchmark with accelerate-example kmeans version
splitKmeans
x
xs
=
elements
splitKmeans
x
xs
=
elements
$
V
.
head
$
V
.
head
$
kmeans
(
\
i
->
VU
.
fromList
([(
_scored_incExc
i
::
Double
)]))
$
kmeans
(
\
i
->
VU
.
fromList
([(
_scored_incExc
i
::
Double
)]))
...
...
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