-- , _wlj_elevation :: Double
-}
}
+ | WeightedLogSim
+ { _wlj_sensibility :: Double
+{-
+ -- , _wlj_thresholdInit :: Double
+ -- , _wlj_thresholdStep :: Double
+ -- | max height for sea level in temporal matching
+ -- , _wlj_elevation :: Double
+-}
+ }
| Hamming
deriving (Show,Generic,Eq)
, _year_matchingFrame :: Int }
deriving (Show,Generic,Eq)
+data CliqueFilter = ByThreshold | ByNeighbours deriving (Show,Generic,Eq)
data Clique =
Fis
{ _fis_support :: Int
, _fis_size :: Int }
| MaxClique
- { _mcl_size :: Int }
+ { _mcl_size :: Int
+ , _mcl_threshold :: Double
+ , _mcl_filter :: CliqueFilter }
deriving (Show,Generic,Eq)
, phyloLevel :: Int
, phyloProximity :: Proximity
, seaElevation :: SeaElevation
+ , findAncestors :: Bool
, phyloSynchrony :: Synchrony
, phyloQuality :: Quality
, timeUnit :: TimeUnit
, phyloName = pack "Default Phylo"
, phyloLevel = 2
, phyloProximity = WeightedLogJaccard 10
- , seaElevation = Constante 0.6 1
- , phyloSynchrony = ByProximityThreshold 0.5 10 SiblingBranches MergeAllGroups
- , phyloQuality = Quality 100 1
+ , seaElevation = Constante 0.1 0.1
+ , findAncestors = True
+ , phyloSynchrony = ByProximityThreshold 0.1 10 SiblingBranches MergeAllGroups
+ , phyloQuality = Quality 0 1
, timeUnit = Year 3 1 5
- , clique = MaxClique 0
- , exportLabel = [BranchLabel MostInclusive 2, GroupLabel MostEmergentInclusive 2]
+ , clique = MaxClique 0 3 ByNeighbours
+ , exportLabel = [BranchLabel MostEmergentTfIdf 2, GroupLabel MostEmergentInclusive 2]
, exportSort = ByHierarchy
, exportFilter = [ByBranchSize 2]
}
instance ToJSON SeaElevation
instance FromJSON TimeUnit
instance ToJSON TimeUnit
+instance FromJSON CliqueFilter
+instance ToJSON CliqueFilter
instance FromJSON Clique
instance ToJSON Clique
instance FromJSON PhyloLabel
-- param : the parameters of the phylomemy (with the user's configuration)
-- periods : the temporal steps of a phylomemy
data Phylo =
- Phylo { _phylo_foundations :: PhyloFoundations
- , _phylo_timeCooc :: !(Map Date Cooc)
- , _phylo_timeDocs :: !(Map Date Double)
- , _phylo_termFreq :: !(Map Int Double)
- , _phylo_horizon :: !(Map (PhyloGroupId,PhyloGroupId) Double)
- , _phylo_groupsProxi :: !(Map (PhyloGroupId,PhyloGroupId) Double)
- , _phylo_param :: PhyloParam
- , _phylo_periods :: Map PhyloPeriodId PhyloPeriod
+ Phylo { _phylo_foundations :: PhyloFoundations
+ , _phylo_timeCooc :: !(Map Date Cooc)
+ , _phylo_timeDocs :: !(Map Date Double)
+ , _phylo_termFreq :: !(Map Int Double)
+ , _phylo_lastTermFreq :: !(Map Int Double)
+ , _phylo_horizon :: !(Map (PhyloGroupId,PhyloGroupId) Double)
+ , _phylo_groupsProxi :: !(Map (PhyloGroupId,PhyloGroupId) Double)
+ , _phylo_param :: PhyloParam
+ , _phylo_periods :: Map PhyloPeriodId PhyloPeriod
}
deriving (Generic, Show, Eq)
, _phylo_groupLevelChilds :: [Pointer]
, _phylo_groupPeriodParents :: [Pointer]
, _phylo_groupPeriodChilds :: [Pointer]
+ , _phylo_groupAncestors :: [Pointer]
}
deriving (Generic, Show, Eq, NFData)
, _phyloClique_period :: (Date,Date)
} deriving (Generic,NFData,Show,Eq)
-
-------------------------
--- | Phylo Ancestor | --
-------------------------
-
-data PhyloAncestor = PhyloAncestor
- { _phyloAncestor_id :: Int
- , _phyloAncestor_ngrams :: [Int]
- , _phyloAncestor_groups :: [PhyloGroupId]
- } deriving (Generic,NFData,Show,Eq)
-
----------------
-- | Export | --
----------------
type DotId = TextLazy.Text
-data EdgeType = GroupToGroup | BranchToGroup | BranchToBranch | PeriodToPeriod deriving (Show,Generic,Eq)
+data EdgeType = GroupToGroup | BranchToGroup | BranchToBranch | GroupToAncestor | PeriodToPeriod deriving (Show,Generic,Eq)
data Filter = ByBranchSize { _branch_size :: Double } deriving (Show,Generic,Eq)
data Sort = ByBirthDate { _sort_order :: Order } | ByHierarchy deriving (Show,Generic,Eq)
-data Tagger = MostInclusive | MostEmergentInclusive deriving (Show,Generic,Eq)
+data Tagger = MostInclusive | MostEmergentInclusive | MostEmergentTfIdf deriving (Show,Generic,Eq)
data PhyloLabel =
BranchLabel
PhyloExport
{ _export_groups :: [PhyloGroup]
, _export_branches :: [PhyloBranch]
- , _export_ancestors :: [PhyloAncestor]
} deriving (Generic, Show)
----------------
-- | JSON instances | --
------------------------
+instance FromJSON Phylo
+instance ToJSON Phylo
+instance FromJSON PhyloParam
+instance ToJSON PhyloParam
+instance FromJSON PhyloPeriod
+instance ToJSON PhyloPeriod
+instance FromJSON PhyloLevel
+instance ToJSON PhyloLevel
+instance FromJSON Software
+instance ToJSON Software
+instance FromJSON PhyloGroup
+instance ToJSON PhyloGroup
$(deriveJSON (unPrefix "_foundations_" ) ''PhyloFoundations)