28 #ifndef GUM_LEARNING_SCORE_FNML_H 29 #define GUM_LEARNING_SCORE_FNML_H 33 #include <agrum/agrum.h> 34 #include <agrum/tools/core/math/math_utils.h> 35 #include <agrum/tools/core/math/variableLog2ParamComplexity.h> 36 #include <agrum/BN/learning/scores_and_tests/score.h> 37 #include <agrum/BN/learning/aprioris/aprioriNoApriori.h> 52 template <
template <
typename >
class ALLOC = std::allocator >
84 ScorefNML(
const DBRowGeneratorParser< ALLOC >& parser,
85 const Apriori< ALLOC >& apriori,
86 const std::vector< std::pair< std::size_t, std::size_t >,
87 ALLOC< std::pair< std::size_t, std::size_t > > >& ranges,
108 ScorefNML(
const DBRowGeneratorParser< ALLOC >& parser,
109 const Apriori< ALLOC >& apriori,
115 ScorefNML(
const ScorefNML< ALLOC >& from);
118 ScorefNML(
const ScorefNML< ALLOC >& from,
const allocator_type& alloc);
124 ScorefNML(ScorefNML< ALLOC >&& from,
const allocator_type& alloc);
189 static std::string
isAprioriCompatible(
const std::string& apriori_type,
double weight = 1.0f);
201 virtual double score_(
const IdCondSet< ALLOC >& idset)
final;
204 #ifndef DOXYGEN_SHOULD_SKIP_THIS 208 AprioriNoApriori< ALLOC > _internal_apriori_;
211 VariableLog2ParamComplexity< ALLOC > _ctable_;
223 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS 224 extern template class gum::learning::ScorefNML<>;
229 #include <agrum/BN/learning/scores_and_tests/scorefNML_tpl.h> virtual ScorefNML< ALLOC > * clone(const allocator_type &alloc) const
virtual copy constructor with a given allocator
virtual std::string isAprioriCompatible() const final
indicates whether the apriori is compatible (meaningful) with the score
virtual double score_(const IdCondSet< ALLOC > &idset) final
returns the score for a given IdCondSet
static std::string isAprioriCompatible(const std::string &apriori_type, double weight=1.0f)
indicates whether the apriori is compatible (meaningful) with the score
virtual ScorefNML< ALLOC > * clone() const
virtual copy constructor
INLINE void emplace(Args &&... args)
ScorefNML(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
virtual ~ScorefNML()
destructor
virtual const Apriori< ALLOC > & internalApriori() const final
returns the internal apriori of the score
ScorefNML(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
the class for computing fNML scores
ScorefNML< ALLOC > & operator=(const ScorefNML< ALLOC > &from)
copy operator
ScorefNML< ALLOC > & operator=(ScorefNML< ALLOC > &&from)
move operator
ScorefNML(ScorefNML< ALLOC > &&from)
move constructor
static std::string isAprioriCompatible(const Apriori< ALLOC > &apriori)
indicates whether the apriori is compatible (meaningful) with the score
ScorefNML(const ScorefNML< ALLOC > &from)
copy constructor
ScorefNML(ScorefNML< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
ScorefNML(const ScorefNML< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator