28 #ifndef GUM_LEARNING_SCORE_BIC_H 29 #define GUM_LEARNING_SCORE_BIC_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 >
82 ScoreBIC(
const DBRowGeneratorParser< ALLOC >& parser,
83 const Apriori< ALLOC >& apriori,
84 const std::vector< std::pair< std::size_t, std::size_t >,
85 ALLOC< std::pair< std::size_t, std::size_t > > >& ranges,
106 ScoreBIC(
const DBRowGeneratorParser< ALLOC >& parser,
107 const Apriori< ALLOC >& apriori,
113 ScoreBIC(
const ScoreBIC< ALLOC >& from);
116 ScoreBIC(
const ScoreBIC< ALLOC >& from,
const allocator_type& alloc);
122 ScoreBIC(ScoreBIC< ALLOC >&& from,
const allocator_type& alloc);
190 double N(
const IdCondSet< ALLOC >& idset);
198 static std::string
isAprioriCompatible(
const std::string& apriori_type,
double weight = 1.0f);
210 virtual double score_(
const IdCondSet< ALLOC >& idset)
final;
213 #ifndef DOXYGEN_SHOULD_SKIP_THIS 217 AprioriNoApriori< ALLOC > _internal_apriori_;
227 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 228 extern template class gum::learning::ScoreBIC<>;
233 #include <agrum/BN/learning/scores_and_tests/scoreBIC_tpl.h> virtual ScoreBIC< ALLOC > * clone() const
virtual copy constructor
ScoreBIC< ALLOC > & operator=(const ScoreBIC< ALLOC > &from)
copy operator
virtual ~ScoreBIC()
destructor
virtual ScoreBIC< ALLOC > * clone(const allocator_type &alloc) const
virtual copy constructor with a given allocator
INLINE void emplace(Args &&... args)
static std::string isAprioriCompatible(const std::string &apriori_type, double weight=1.0f)
indicates whether the apriori is compatible (meaningful) with the score
ScoreBIC(const ScoreBIC< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
ScoreBIC(ScoreBIC< ALLOC > &&from)
move constructor
double N(const IdCondSet< ALLOC > &idset)
returns the size of the database w.r.t. a given idset
virtual std::string isAprioriCompatible() const final
indicates whether the apriori is compatible (meaningful) with the score
ScoreBIC(const ScoreBIC< ALLOC > &from)
copy constructor
ScoreBIC(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
ScoreBIC< ALLOC > & operator=(ScoreBIC< ALLOC > &&from)
move operator
the class for computing BIC scores
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
ScoreBIC(ScoreBIC< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
virtual double score_(const IdCondSet< ALLOC > &idset) final
returns the score for a given IdCondSet
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
ScoreBIC(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