root/libBM.h @ 4

Revision 4, 1.6 kB (checked in by smidl, 16 years ago)

doxy

  • Property svn:eol-style set to native
Line 
1/*!
2 * \file
3 * \brief Bayesian Models (bm) that use Bayes rule to learn from observations
4 * \author Vaclav Smidl.
5 *
6 * -----------------------------------
7 * BDM++ - C++ library for Bayesian Decision Making under Uncertainty
8 *
9 * Using IT++ for numerical operations
10 * -----------------------------------
11 */
12
13#ifndef BM_H
14#define BM_H
15
16#include <itpp/itbase.h>
17//#include <std>
18
19using namespace itpp;
20
21//! Class representing variables, most often random variables
22class RV {
23int len;
24ivec ids;
25ivec sizes;
26ivec times;
27ivec obs;
28Array<std::string> names;
29
30public:
31 //! Full constructor which is called by the others
32 RV(ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs);
33 //! default constructor
34 RV(ivec ids);
35 friend std::ostream &operator<<(std::ostream &os, const RV &rv);
36};
37
38
39
40
41//! Class representing function of variables
42class fnc {
43RV rv;
44};
45
46//! Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.
47class BM {
48public:
49//! Incremental Bayes rule
50void bayes(vec dt);
51//! Batch Bayes rule (columns of Dt are observations)
52virtual void bayes(mat Dt);
53};
54
55//! Probability density function with numerical statistics, e.g. posterior density.
56class epdf {
57RV rv;
58public:
59//! Returns the required moment of the epdf
60virtual vec moment(const int order = 1);
61};
62
63//! Conditional probability density, e.g. modeling some dependencies.
64class mpdf {
65//! modeled random variable
66RV rv;
67//! random variable in condition
68RV rvc;
69public:
70
71//! Returns the required moment of the epdf
72virtual fnc moment(const int order = 1);
73};
74
75#endif // BM_H
Note: See TracBrowser for help on using the browser.