59#ifndef GUM_LEARNING_MIIC_H
60#define GUM_LEARNING_MIIC_H
70 using CondThreePoints = std::tuple< NodeId, NodeId, NodeId, std::vector< NodeId > >;
72 using Ranking = std::pair< ThreePoints*, double >;
108 explicit Miic(
int maxLog);
146 HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > >& sepSet,
151 HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > >& sepSet,
164 const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > >& sepSet);
168 const std::vector< NodeId >& ui,
176 const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > >& sepSet,
177 HashTable< std::pair< NodeId, NodeId >,
char >& marks);
179 std::vector< ProbabilisticRanking >
181 std::vector< ProbabilisticRanking > probaTriples);
190 HashTable< std::pair< NodeId, NodeId >,
char >& marks,
198 HashTable< std::pair< NodeId, NodeId >,
char >& marks,
Abstract base class for constraint-based structure learning algorithms.
The class for generic Hash Tables.
Base class for mixed graphs.
ConstraintBasedLearning()
bool operator()(const Ranking &e1, const Ranking &e2) const
bool operator()(const CondRanking &e1, const CondRanking &e2) const
bool operator()(const ProbabilisticRanking &e1, const ProbabilisticRanking &e2) const
std::vector< ProbabilisticRanking > updateProbaTriples_(const MixedGraph &graph, std::vector< ProbabilisticRanking > probaTriples)
void _orientingVstructureMiic_(MixedGraph &graph, HashTable< std::pair< NodeId, NodeId >, char > &marks, NodeId x, NodeId y, NodeId z, double p1, double p2)
void orientationMiic_(CorrectedMutualInformation &mutualInformation, MixedGraph &graph, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet)
Miic & operator=(const Miic &from)
MixedGraph learnMixedStructure(MixedGraph graph) override
MixedGraph learnSkeleton(MixedGraph graph) override
void _propagatingOrientationMiic_(MixedGraph &graph, HashTable< std::pair< NodeId, NodeId >, char > &marks, NodeId x, NodeId y, NodeId z, double p1, double p2)
void iteration_(CorrectedMutualInformation &mutualInformation, MixedGraph &graph, HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet, Heap< CondRanking, GreaterPairOn2nd > &rank)
void findBestContributor_(NodeId x, NodeId y, const std::vector< NodeId > &ui, const MixedGraph &graph, CorrectedMutualInformation &mutualInformation, Heap< CondRanking, GreaterPairOn2nd > &rank)
std::vector< ProbabilisticRanking > unshieldedTriplesMiic_(const MixedGraph &graph, CorrectedMutualInformation &mutualInformation, const HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet, HashTable< std::pair< NodeId, NodeId >, char > &marks)
CorrectedMutualInformation * mi_
ArcProperty< double > _arcProbas_
void initiation_(CorrectedMutualInformation &mutualInformation, MixedGraph &graph, HashTable< std::pair< NodeId, NodeId >, std::vector< NodeId > > &sepSet, Heap< CondRanking, GreaterPairOn2nd > &rank)
void setMutualInformation(CorrectedMutualInformation &mi)
bool _isNotLatentCouple_(NodeId x, NodeId y)
Size NodeId
Type for node ids.
HashTable< Arc, VAL > ArcProperty
Property on graph elements.
include the inlined functions if necessary
std::pair< ThreePoints *, double > Ranking
std::pair< CondThreePoints *, double > CondRanking
std::tuple< NodeId, NodeId, NodeId, std::vector< NodeId > > CondThreePoints
std::tuple< ThreePoints *, double, double, double > ProbabilisticRanking
gum is the global namespace for all aGrUM entities