47#ifndef GUM_LEARNING_PSEUDO_COUNT_H
48#define GUM_LEARNING_PSEUDO_COUNT_H
96 const Prior& external_prior,
97 const std::vector< std::pair< std::size_t, std::size_t > >&
ranges,
118 const Prior& external_prior,
179 void setRanges(
const std::vector< std::pair< std::size_t, std::size_t > >& new_ranges);
185 const std::vector< std::pair< std::size_t, std::size_t > >&
ranges()
const;
192 std::vector< double >
get(
const std::vector< NodeId >& ids);
the class used to read a row in the database and to transform it into a set of DBRow instances that c...
The class representing a tabular database as used by learning tasks.
the base class for all a priori
const DatabaseTable & database() const
return the database used by the pseudo-count
virtual void clear()
clears all the data structures from memory, including the cache
PseudoCount & operator=(PseudoCount &&from)
move operator
virtual bool isGumNumberOfThreadsOverriden() const
indicates whether the user set herself the number of threads
PseudoCount(const PseudoCount &from)
copy constructor
void clearRanges()
reset the ranges to the one range corresponding to the whole database
virtual Size getNumberOfThreads() const
returns the current max number of threads of the scheduler
std::vector< double > get(const std::vector< NodeId > &ids)
returns the pseudo-count of a pair of nodes given some other nodes
const std::vector< std::pair< std::size_t, std::size_t > > & ranges() const
returns the current ranges
const Bijection< NodeId, std::size_t > & nodeId2Columns() const
return the mapping between the columns of the database and the node ids
virtual ~PseudoCount()
destructor
PseudoCount & operator=(const PseudoCount &from)
copy operator
const std::vector< NodeId > empty_ids_
an empty vector
Prior * prior_
the expert knowledge a priorwe add to the contingency tables
PseudoCount(const DBRowGeneratorParser &parser, const Prior &external_prior, const std::vector< std::pair< std::size_t, std::size_t > > &ranges, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
PseudoCount(PseudoCount &&from)
move constructor
virtual void setMinNbRowsPerThread(const std::size_t nb) const
changes the number min of rows a thread should process in a multithreading context
void setRanges(const std::vector< std::pair< std::size_t, std::size_t > > &new_ranges)
sets new ranges to perform the counts used by the independence test
virtual std::size_t minNbRowsPerThread() const
returns the minimum of rows that each thread should process
virtual void setNumberOfThreads(Size nb)
sets the number max of threads that can be used
PseudoCount(const DBRowGeneratorParser &parser, const Prior &external_prior, const Bijection< NodeId, std::size_t > &nodeId2columns=Bijection< NodeId, std::size_t >())
default constructor
RecordCounter counter_
the record counter used for the counts over discrete variables
The class that computes counting of observations from the database.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
include the inlined functions if necessary
gum is the global namespace for all aGrUM entities
the base class for all a priori
the base class for all the independence tests used for learning
The class that computes counting of observations from the database.