Stores a data set consisting of multiple samples, where each sample is the observed joint state of some variables.
More...
#include <dai/evidence.h>
Public Types |
typedef std::map< Var, size_t > | Observation |
| Stores joint state of a set of variables.
|
Private Member Functions |
void | addEvidenceTabFile (std::istream &is, std::map< std::string, Var > &varMap) |
| Read in tabular data from a stream and add the read samples to *this .
|
Private Attributes |
std::vector< Observation > | _samples |
| Each sample is an observed joint state of some variables.
|
Detailed Description
Stores a data set consisting of multiple samples, where each sample is the observed joint state of some variables.
- Note
- Each sample can describe the joint state of a different set of variables, in order to be able to deal with missing data.
- Author
- Charles Vaske
- Examples:
- example_sprinkler_em.cpp.
Member Typedef Documentation
Stores joint state of a set of variables.
Iterator over the samples.
Constant iterator over the samples.
Constructor & Destructor Documentation
dai::Evidence::Evidence |
( |
| ) |
|
|
inline |
dai::Evidence::Evidence |
( |
std::vector< Observation > & |
samples | ) |
|
|
inline |
Member Function Documentation
void dai::Evidence::addEvidenceTabFile |
( |
std::istream & |
is, |
|
|
FactorGraph & |
fg |
|
) |
| |
Read in tabular data from a stream and add the read samples to *this
.
- Parameters
-
is | Input stream in .tab file format, describing joint observations of variables in fg |
fg | Factor graph describing the corresponding variables |
- See Also
- Evidence (.tab) file format
- Exceptions
-
INVALID_EVIDENCE_FILE | if the input stream is not valid |
- Examples:
- example_sprinkler_em.cpp.
size_t dai::Evidence::nrSamples |
( |
| ) |
const |
|
inline |
Returns iterator that points to the first sample.
Returns constant iterator that points to the first sample.
Returns iterator that points beyond the last sample.
Returns constant iterator that points beyond the last sample.
void dai::Evidence::addEvidenceTabFile |
( |
std::istream & |
is, |
|
|
std::map< std::string, Var > & |
varMap |
|
) |
| |
|
private |
Read in tabular data from a stream and add the read samples to *this
.
Member Data Documentation
Each sample is an observed joint state of some variables.
The documentation for this class was generated from the following files: