29 #ifndef GUM_LEARNING_K_NML_H 30 #define GUM_LEARNING_K_NML_H 34 #include <agrum/tools/core/math/math_utils.h> 35 #include <agrum/tools/core/math/variableLog2ParamComplexity.h> 36 #include <agrum/tools/stattests/independenceTest.h> 48 template <
template <
typename >
class ALLOC = std::allocator >
82 KNML(
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,
108 KNML(
const DBRowGeneratorParser< ALLOC >& parser,
109 const Apriori< ALLOC >& apriori,
115 KNML(
const KNML< ALLOC >& from);
118 KNML(
const KNML< ALLOC >& from,
const allocator_type& alloc);
121 KNML(KNML< ALLOC >&& from);
124 KNML(KNML< ALLOC >&& from,
const allocator_type& alloc);
197 virtual void clear();
203 virtual void useCache(
const bool on_off);
225 virtual double score_(
const IdCondSet< ALLOC >& idset)
final;
228 #ifndef DOXYGEN_SHOULD_SKIP_THIS 232 VariableLog2ParamComplexity< ALLOC > _param_complexity_;
243 #include <agrum/tools/stattests/kNML_tpl.h> INLINE void emplace(Args &&... args)
KNML(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 KNML< ALLOC > * clone(const allocator_type &alloc) const
virtual copy constructor with a given allocator
KNML(KNML< ALLOC > &&from, const allocator_type &alloc)
move constructor with a given allocator
virtual void clear()
clears all the data structures from memory, including the C_n^r cache
virtual ~KNML()
destructor
KNML(const KNML< ALLOC > &from)
copy constructor
KNML(KNML< ALLOC > &&from)
move constructor
KNML(const KNML< ALLOC > &from, const allocator_type &alloc)
copy constructor with a given allocator
virtual void clearCache()
clears the current C_n^r cache
virtual double score_(const IdCondSet< ALLOC > &idset) final
returns the score for a given IdCondSet
KNML< ALLOC > & operator=(const KNML< ALLOC > &from)
copy operator
the class for computing the NML penalty used by 3off2
virtual void useCache(const bool on_off)
turn on/off the use of the C_n^r cache
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
virtual KNML< ALLOC > * clone() const
virtual copy constructor
KNML< ALLOC > & operator=(KNML< ALLOC > &&from)
move operator
KNML(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