Stores a data set consisting of multiple samples, where each sample is the observed joint state of some variables.
More...
#include <dai/evidence.h>
|
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 . More...
|
|
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.
Stores joint state of a set of variables.
Iterator over the samples.
Constant iterator over the samples.
dai::Evidence::Evidence |
( |
| ) |
|
|
inline |
dai::Evidence::Evidence |
( |
std::vector< Observation > & |
samples | ) |
|
|
inline |
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
.
Each sample is an observed joint state of some variables.
The documentation for this class was generated from the following files: