Commit e5419936 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Map list automatic filtering] adding doc.

parent 541b5a3b
...@@ -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) -- Kmeans 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)]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment