/*! \page user_guide2 BDM Use - Estimation and Bayes Rule Baysian theory is predominantly used in system identification, or estimation problems. This section is concerned with recursive estimation, as implemneted in prepared scenario \c estimator. The function of the \c estimator is graphically illustrated: \dot digraph estimation{ node [shape=box]; {rank="same"; "Data Source"; "Bayesian Model"} "Data Source" -> "Bayesian Model" [label="data"]; "Bayesian Model" -> "Result Logger" [label="estimation\n result"]; "Data Source" -> "Result Logger" [label="Simulated\n data"]; } \enddot Here, \li Data Source is an object (class DS) providing sequential data, \f$ [d_1, d_2, \ldots d_t] \f$. \li Bayesian Model is an object (class BM) performing Bayesian filtering, \li Result Logger is an object (class logger) dedicated to storing important data from the experiment. Since objects datasource and the logger has already been introduced in section \ref user_guide, it remains to introduce object \c Bayesian \c Model (bdm::BM). \section theory Bayes rule and estimation The object bdm::BM is basic software image of the Bayes rule: \f[ f(x_t|d_1\ldots d_t) \propto f(d_t|x_t,d_1\ldots d_{t-1}) f(x_t| d_1\ldots d_{t-1}) \f] Since this operation can not be defined universally, the object is defined as abstract class with methods for: - Bayes rule as defined above, operation bdm::BM::bayes() which expects to get the current data record \c dt, \f$ d_t \f$ - log-likelihood i.e. numerical value of \f$ f(d_t|d_1\ldots d_{t-1})\f$ as a typical side-product, since it is required in denominator of the above formula. For some models, computation of this value may require extra effort, hence it computation can be suppressed by setting BM::set_evalll(false). - prediction the object has enough information to create the one-step ahead predictor, i.e. \f[ f(d_{t+1}| d_1 \ldots d_{t}), \f] this object can be either created bdm::BM::predictor(), sometimes it is enought only a few values of prediction hence construction of the full predictor would be too expensive operation. For this situation were designed cheaper operations bdm::BM::logpred() or bdm::BM::epredictor(). These are only basic operations, see full documentation for full range of defined operations. These operation are abstract, i.e. not implemented for the general class. Implementation of these operations is heavily dependent on the specific class of prior pdf, or its approximations. We can identify only a few principal approaches to this problem. For example, analytical estimation which is possible within sufficient the Exponential Family, or estimation when both prior and posterior are approximated by empirical densities. These approaches are first level of descendants of class \c BM, classes bdm::BMEF and bdm::PF, repectively. Variants of these approaches are implemented as descendats of these level-two classes. This way, each estimation method (represented a class) is fitted in its place in the tree of approximations. This is useful even from software point of view, since related approximations have common methods and data fields. \section arx Estimation of ARX models Autoregressive models has already been introduced in \ref ug_arx_sim where their simulator has been presented. We will use the datasource defined there to provide data for estimation. The following code is from bdmtoolbox/tutorial/userguide/arx_basic_example \code A1.class = 'ARX'; A1.rv = y; A1.rgr = RVtimes({y,y},[-3,-1]) ; \endcode Using the same logic as before, */