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
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
Hide 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)
-- . fromIndex fi $ filterMat $ cooc2mat ti m
type
ListSize
=
Int
type
BinSize
=
Double
type
MapListSize
=
Int
type
SampleBins
=
Double
type
Clusters
=
Int
-- Map list creation
-- Kmean
split into 2
main clusters with Inclusion/Exclusion (relevance score)
-- Sample the main cluster ordered by specificity/genericity in
s
parts
--
|
Map list creation
-- Kmean
s split into (Clusters::Int)
main clusters with Inclusion/Exclusion (relevance score)
-- Sample the main cluster ordered by specificity/genericity in
(SampleBins::Double)
parts
-- each parts is then ordered by Inclusion/Exclusion
-- take n scored terms in each parts where n *
s = l
takeSome
::
Ord
t
=>
ListSize
->
BinSize
->
[
Scored
t
]
->
[
Scored
t
]
takeSome
l
s
scores
=
L
.
take
l
-- take n scored terms in each parts where n *
SampleBins = MapListSize.
takeSome
::
Ord
t
=>
MapListSize
->
SampleBins
->
Clusters
->
[
Scored
t
]
->
[
Scored
t
]
takeSome
l
s
k
scores
=
L
.
take
l
$
takeSample
n
m
$
splitKmeans
2
scores
$
splitKmeans
k
scores
where
--
(TODO: benchmark with accelerate-example kmeans version)
--
TODO: benchmark with accelerate-example kmeans version
splitKmeans
x
xs
=
elements
$
V
.
head
$
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