28 #ifndef GUM_LEARNING_SCORE_LOG2_LIKELIHOOD_H 29 #define GUM_LEARNING_SCORE_LOG2_LIKELIHOOD_H 33 #include <agrum/agrum.h> 34 #include <agrum/tools/core/math/math_utils.h> 35 #include <agrum/BN/learning/scores_and_tests/score.h> 36 #include <agrum/BN/learning/aprioris/aprioriNoApriori.h> 50 template <
template <
typename >
class ALLOC = std::allocator >
83 const DBRowGeneratorParser< ALLOC >& parser,
84 const Apriori< ALLOC >& apriori,
85 const std::vector< std::pair< std::size_t, std::size_t >,
86 ALLOC< std::pair< std::size_t, std::size_t > > >& ranges,
108 const DBRowGeneratorParser< ALLOC >& parser,
109 const Apriori< ALLOC >& apriori,
118 ScoreLog2Likelihood(
const ScoreLog2Likelihood< ALLOC >& from,
const allocator_type& alloc);
189 double score(
const IdCondSet< ALLOC >& idset);
197 static std::string
isAprioriCompatible(
const std::string& apriori_type,
double weight = 1.0f);
209 virtual double score_(
const IdCondSet< ALLOC >& idset)
final;
212 #ifndef DOXYGEN_SHOULD_SKIP_THIS 216 AprioriNoApriori< ALLOC > _internal_apriori_;
226 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 227 extern template class gum::learning::ScoreLog2Likelihood<>;
232 #include <agrum/BN/learning/scores_and_tests/scoreLog2Likelihood_tpl.h> ScoreLog2Likelihood(ScoreLog2Likelihood< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
virtual ScoreLog2Likelihood< ALLOC > * clone() const
virtual copy constructor
INLINE void emplace(Args &&... args)
ScoreLog2Likelihood(const ScoreLog2Likelihood< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
virtual ~ScoreLog2Likelihood()
destructor
static std::string isAprioriCompatible(const Apriori< ALLOC > &apriori)
indicates whether the apriori is compatible (meaningful) with the score
virtual const Apriori< ALLOC > & internalApriori() const final
returns the internal apriori of the score
virtual ScoreLog2Likelihood< ALLOC > * clone(const allocator_type &alloc) const
virtual copy constructor with a given allocator
the class for computing Log2-likelihood scores
ScoreLog2Likelihood(const DBRowGeneratorParser< ALLOC > &parser, const Apriori< ALLOC > &apriori, const Bijection< NodeId, std::size_t, ALLOC< std::size_t > > &nodeId2columns=Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(), const allocator_type &alloc=allocator_type())
default constructor
ScoreLog2Likelihood(const ScoreLog2Likelihood< ALLOC > &from)
copy constructor
virtual double score_(const IdCondSet< ALLOC > &idset) final
returns the score for a given IdCondSet
ScoreLog2Likelihood< ALLOC > & operator=(const ScoreLog2Likelihood< ALLOC > &from)
copy operator
ScoreLog2Likelihood(const DBRowGeneratorParser< ALLOC > &parser, const Apriori< ALLOC > &apriori, const std::vector< std::pair< std::size_t, std::size_t >, ALLOC< std::pair< std::size_t, std::size_t > > > &ranges, const Bijection< NodeId, std::size_t, ALLOC< std::size_t > > &nodeId2columns=Bijection< NodeId, std::size_t, ALLOC< std::size_t > >(), const allocator_type &alloc=allocator_type())
default constructor
ScoreLog2Likelihood(ScoreLog2Likelihood< ALLOC > &&from)
move constructor
virtual std::string isAprioriCompatible() const final
indicates whether the apriori is compatible (meaningful) with the score
static std::string isAprioriCompatible(const std::string &apriori_type, double weight=1.0f)
indicates whether the apriori is compatible (meaningful) with the score
double score(const IdCondSet< ALLOC > &idset)
returns the score for a given IdCondSet
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
ScoreLog2Likelihood< ALLOC > & operator=(ScoreLog2Likelihood< ALLOC > &&from)
move operator