Commit 66d2af28 authored by qlobbe's avatar qlobbe

change the temporal matching

parent 1167c256
Pipeline #600 canceled with stage
...@@ -127,7 +127,7 @@ defaultConfig = ...@@ -127,7 +127,7 @@ defaultConfig =
, phyloLevel = 2 , phyloLevel = 2
, phyloProximity = WeightedLogJaccard 10 0 0.1 , phyloProximity = WeightedLogJaccard 10 0 0.1
, phyloSynchrony = ByProximityDistribution 0 , phyloSynchrony = ByProximityDistribution 0
, phyloQuality = Quality 0.5 1 , phyloQuality = Quality 0.3 1
, timeUnit = Year 3 1 5 , timeUnit = Year 3 1 5
, contextualUnit = Fis 1 5 , contextualUnit = Fis 1 5
, exportLabel = [BranchLabel MostInclusive 2, GroupLabel MostEmergentInclusive 2] , exportLabel = [BranchLabel MostInclusive 2, GroupLabel MostEmergentInclusive 2]
......
...@@ -145,20 +145,18 @@ filterPointers proxi thr pts = filter (\(_,w) -> filterProximity proxi thr w) pt ...@@ -145,20 +145,18 @@ filterPointers proxi thr pts = filter (\(_,w) -> filterProximity proxi thr w) pt
phyloGroupMatching :: [[PhyloGroup]] -> Filiation -> Proximity -> Map Date Double -> Double -> PhyloGroup -> PhyloGroup phyloGroupMatching :: [[PhyloGroup]] -> Filiation -> Proximity -> Map Date Double -> Double -> PhyloGroup -> PhyloGroup
phyloGroupMatching candidates fil proxi docs thr ego = phyloGroupMatching candidates fil proxi docs thr ego =
case null nextPointers of if (null $ filterPointers proxi thr $ getPeriodPointers fil ego)
-- | let's find new pointers -- | let's find new pointers
True -> if null $ filterPointers proxi thr $ getPeriodPointers fil ego then if null nextPointers
then addPointers ego fil TemporalPointer [] then addPointers ego fil TemporalPointer []
-- | or keep the old ones else addPointers ego fil TemporalPointer
else addPointers ego fil TemporalPointer $ head' "phyloGroupMatching"
$ filterPointers proxi thr $ getPeriodPointers fil ego -- | Keep only the best set of pointers grouped by proximity
False -> addPointers ego fil TemporalPointer $ groupBy (\pt pt' -> snd pt == snd pt')
$ head' "phyloGroupMatching" $ reverse $ sortOn snd $ head' "pointers" nextPointers
-- | Keep only the best set of pointers grouped by proximity -- | Find the first time frame where at leats one pointer satisfies the proximity threshold
$ groupBy (\pt pt' -> snd pt == snd pt') else addPointers ego fil TemporalPointer
$ reverse $ sortOn snd $ head' "pointers" $ filterPointers proxi thr $ getPeriodPointers fil ego
$ nextPointers
-- | Find the first time frame where at leats one pointer satisfies the proximity threshold
where where
nextPointers :: [[Pointer]] nextPointers :: [[Pointer]]
nextPointers = take 1 nextPointers = take 1
......
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