root/doc/html/intro.html @ 210

Revision 210, 9.5 kB (checked in by smidl, 16 years ago)

dokumentace

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3<title>mixpp: Introduction to Bayesian Decision Making Toolbox BDM</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.6 -->
8<div class="navigation" id="top">
9  <div class="tabs">
10    <ul>
11      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13      <li><a href="annotated.html"><span>Classes</span></a></li>
14      <li><a href="files.html"><span>Files</span></a></li>
15    </ul>
16  </div>
17</div>
18<div class="contents">
19<h1><a class="anchor" name="intro">Introduction to Bayesian Decision Making Toolbox BDM </a></h1>This is a brief introduction into elements used in the BDM. The toolbox was designed for two principle tasks:<p>
20<ul>
21<li>
22Design of Bayesian decisions-making startegies,  </li>
23<li>
24Bayesian system identification for on-line and off-line scenarios.  </li>
25</ul>
26Theoretically, the latter is a special case of the former, however we list it separately to highlight its importance in practical applications.<p>
27In order to achieve these principal goals in full generality, we need to implement full range of probabilistic operations such as: marginalization, conditioning, Bayes rule, combination of probability densities. Furthermore, many supportive operations are also required, such as data handling and logging of results. Here, we explain the basic classes for each task and point to advanced topics on the issue.<h2><a class="anchor" name="phil">
28Philosophy of the Toolbox</a></h2>
29The primary obstacle for creation of any any Bayesian software is how to address inherent computational intractability of the calculus. Typically, toolboxes implementing Bayesian calculus choose one particular task or one particular approximation methodology. For example, "BUGS" is a toolbox focused on evaluation using Gibbs sampling, "BNT" is focused on Bayesian Networks, "NFT" on Bayesian filtering. BDM takes another approach: <b> all tasks are defined via their functional form, detailed implementation is an internal matter of each class.</b><p>
30This philosophy results in a tree structure of inheritance, where the root is an abstract class. Different approaches to Bayesian calculus are implemented as specialization of this class. Interoperability of these classes is achieved by data classes, representing mathematical objects arising in the Bayesian calculus.<p>
31The task of Bayesian estimation decribed in the next Section is a good illustration of the philosophy.<h2><a class="anchor" name="bayes">
32Bayesian parameter estimation</a></h2>
33Bayesian parameter estimation is, in essence, straightforward application of the Bayes rule:<p class="formulaDsp">
34<img class="formulaDsp" alt="\[ f(\theta|D) =\frac{f(D|\theta)f(\theta)}{f(D)}\]" src="form_81.png">
35<p>
36 where, <img class="formulaInl" alt="$ \theta $" src="form_82.png"> is an unknown parameter, <img class="formulaInl" alt="$ D $" src="form_83.png"> denotes the observed data, <img class="formulaInl" alt="$ f(D|\theta) $" src="form_84.png"> is the likelihood function, <img class="formulaInl" alt="$ f(\theta) $" src="form_85.png"> is the prior density, and <img class="formulaInl" alt="$ f(D) $" src="form_86.png"> is "evidence" of the data.<p>
37This simple rule has, however, many incarnations for various types of the likelihood, prior and evidence. For example, the Bayes rule can be evaluated exactly for likelihood function from the Exponential Family and conjugate prior, where the whole functional operation reduces to algebraic operation on sufficient statistics. For other likelihood functions and priors, various approximate schemes (such as Monte Carlo sampling, or maximum-likelihood optimizations) were proposed. To capture all of these options, we abstract the core functionality in the class <code><a class="el" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>:</code> <p>
38<dl>
39</dl>
40<a class="el" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>, abstract class defining two key methods: <ul>
41<li>
42<div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> bayes(vec dt)
43</pre></div> or <div class="fragment"><pre class="fragment"> <span class="keywordtype">void</span> bayesB(mat D)
44</pre></div>  </li>
45<li>
46<div class="fragment"><pre class="fragment"> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>&amp; _epdf().
47</pre></div>  </li>
48</ul>
49<p>
50Hence, the class represent an "estimator" that is capable of returning a posterior density (via method <code>_epdf</code> ) and application of the Bayes rule vis method <code>bayes</code> .<p>
51Functions <code>bayes</code> and <code>bayesB</code> denotes on-line and off-line scenario, respectively. Function <code>bayes</code> assumes that <dl compact><dt><b>Parameters:</b></dt><dd>
52  <table border="0" cellspacing="2" cellpadding="0">
53    <tr><td valign="top"></td><td valign="top"><em>dt</em>&nbsp;</td><td>is an incremental data record and applies the Bayes rule using posterior density for the previous step as a prior. On the other hand, <code>bayesB</code> assumes that </td></tr>
54    <tr><td valign="top"></td><td valign="top"><em>D</em>&nbsp;</td><td>is the full data record, and uses the original prior created during construction of the object.</td></tr>
55  </table>
56</dl>
57Posterior density is represented by a class <code><a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a></code> . When we are interested only in part of the posterior density we can apply probability calculus via methods of this class.<h2><a class="anchor" name="calc">
58Probability calculus</a></h2>
59Key objects of probability calculus are probability density functions, pdfs. We distinguish two types of pdfs: <dl>
60</dl>
61<a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>, a pdf fully defined by statistics: <img class="formulaInl" alt="$ f(a | S)$" src="form_87.png">, with numerical statics <img class="formulaInl" alt="$ S $" src="form_88.png">, and   <a class="el" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>, a pdf conditioned on another random variable: <img class="formulaInl" alt="$ f(a| b) $" src="form_89.png">, where <img class="formulaInl" alt="$ b $" src="form_90.png"> is a variable. <p>
62The principal distinction between these types is that operations defined on these classes have different results. For example, the first moment of the former is a numeric value, while for the latter it is a functional form.<p>
63The most important operations on pdfs are: <dl>
64</dl>
65evaluation in a point: implemented by methods <div class="fragment"><pre class="fragment"> <span class="keywordtype">double</span> evallog(vec dt)
66</pre></div> for <code><a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a></code> and <div class="fragment"><pre class="fragment"> <span class="keywordtype">double</span> evallogcond()
67</pre></div> for <code><a class="el" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a></code>.   marginalization: implemented by method <div class="fragment"><pre class="fragment"> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* marginal(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv)
68</pre></div> for <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>,   conditioning: implemented by method <div class="fragment"><pre class="fragment"> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* conditional(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv)
69</pre></div> for <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a><p>
70Note that a new data class, <code><a class="el" href="classRV.html" title="Class representing variables, most often random variables.">RV</a></code>, is introduced. This class represents description of a multivariate random variable.<h2><a class="anchor" name="RVs">
71Random Variables</a></h2>
72In mathematics, variable is a symbol of quantity that has no assigned value. Its purpose is to distinguish one variable from another. Hence, in software representation it has a meaning of unique identifier. Since we allow multivariate random variables, the variable also carries its dimensionality. Moreover, for dealing with time-varying estimation it also makes sense to distinguish different time-shift of variables.<p>
73The main purpose of this class is to mediate composition and decomposition of pdfs. See,... </div>
74<hr size="1"><address style="text-align: right;"><small>Generated on Wed Nov 12 20:46:07 2008 for mixpp by&nbsp;
75<a href="http://www.doxygen.org/index.html">
76<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
77</body>
78</html>
Note: See TracBrowser for help on using the browser.