<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6">
  <compounddef id="merg__pred_8cpp" kind="file">
    <compoundname>merg_pred.cpp</compoundname>
    <includes refid="arx_8h" local="no">estim/arx.h</includes>
    <includes refid="libEF_8h" local="no">stat/libEF.h</includes>
    <includes refid="loggers_8h" local="no">stat/loggers.h</includes>
    <includes refid="merger_8h" local="no">stat/merger.h</includes>
    <incdepgraph>
      <node id="556">
        <label>stat/loggers.h</label>
        <link refid="loggers_8h"/>
        <childnode refid="550" relation="include">
        </childnode>
        <childnode refid="552" relation="include">
        </childnode>
        <childnode refid="555" relation="include">
        </childnode>
      </node>
      <node id="552">
        <label>libBM.h</label>
        <link refid="libBM_8h"/>
        <childnode refid="550" relation="include">
        </childnode>
      </node>
      <node id="557">
        <label>stat/merger.h</label>
        <link refid="merger_8h"/>
        <childnode refid="550" relation="include">
        </childnode>
        <childnode refid="552" relation="include">
        </childnode>
        <childnode refid="553" relation="include">
        </childnode>
        <childnode refid="558" relation="include">
        </childnode>
      </node>
      <node id="558">
        <label>emix.h</label>
        <link refid="emix_8h"/>
        <childnode refid="552" relation="include">
        </childnode>
        <childnode refid="553" relation="include">
        </childnode>
      </node>
      <node id="555">
        <label>../itpp_ext.h</label>
        <link refid="itpp__ext_8h-source"/>
        <childnode refid="550" relation="include">
        </childnode>
      </node>
      <node id="548">
        <label>work/git/mixpp/mpdm/merg_pred.cpp</label>
        <link refid="merg_pred.cpp"/>
        <childnode refid="549" relation="include">
        </childnode>
        <childnode refid="553" relation="include">
        </childnode>
        <childnode refid="556" relation="include">
        </childnode>
        <childnode refid="557" relation="include">
        </childnode>
      </node>
      <node id="553">
        <label>../stat/libEF.h</label>
        <link refid="libEF_8h"/>
        <childnode refid="550" relation="include">
        </childnode>
        <childnode refid="554" relation="include">
        </childnode>
        <childnode refid="552" relation="include">
        </childnode>
        <childnode refid="555" relation="include">
        </childnode>
      </node>
      <node id="549">
        <label>estim/arx.h</label>
        <link refid="arx_8h"/>
        <childnode refid="550" relation="include">
        </childnode>
        <childnode refid="551" relation="include">
        </childnode>
        <childnode refid="553" relation="include">
        </childnode>
      </node>
      <node id="551">
        <label>../stat/libFN.h</label>
        <link refid="libFN_8h-source"/>
        <childnode refid="550" relation="include">
        </childnode>
        <childnode refid="552" relation="include">
        </childnode>
      </node>
      <node id="550">
        <label>itpp/itbase.h</label>
      </node>
      <node id="554">
        <label>../math/libDC.h</label>
        <link refid="libDC_8h"/>
        <childnode refid="550" relation="include">
        </childnode>
      </node>
    </incdepgraph>
      <sectiondef kind="func">
      <memberdef kind="function" id="merg__pred_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
        <type>int</type>
        <definition>int main</definition>
        <argsstring>()</argsstring>
        <name>main</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="/home/smidl/work/git/mixpp/mpdm/merg_pred.cpp" line="11" bodyfile="/home/smidl/work/git/mixpp/mpdm/merg_pred.cpp" bodystart="11" bodyend="90"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;<ref refid="arx_8h" kindref="compound" tooltip="Bayesian Filtering for generalized autoregressive (ARX) model.">estim/arx.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="libEF_8h" kindref="compound" tooltip="Probability distributions for Exponential Family models.">stat/libEF.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="loggers_8h" kindref="compound" tooltip="Loggers for storing results of experiments.">stat/loggers.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;<ref refid="merger_8h" kindref="compound" tooltip="Mergers for combination of pdfs.">stat/merger.h</ref>&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="keyword">using<sp/>namespace<sp/></highlight><highlight class="normal">itpp;</highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//These<sp/>lines<sp/>are<sp/>needed<sp/>for<sp/>use<sp/>of<sp/>cout<sp/>and<sp/>endl</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::cout;</highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="keyword">using</highlight><highlight class="normal"><sp/>std::endl;</highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/><ref refid="sim__var_8cpp_1e66f6b31b5ad750f1fe042a706a4e3d4" kindref="member" tooltip="Extended Kalman filter with unknown Q.">main</ref>()<sp/>{</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>model</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>y<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{y<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>u1<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{u1<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>u2<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{u2<sp/>}&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="16"><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Full<sp/>system</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>thg<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;0.7<sp/>1<sp/>1&quot;</highlight><highlight class="normal"><sp/>);<sp/></highlight><highlight class="comment">//Simulated<sp/>system</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//y=a<sp/>y_t-1<sp/>+<sp/>u1<sp/>+<sp/>u2</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>sqr=0.1;</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ord<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="22"><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Estimated<sp/>systems<sp/>ARX(2)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>thri<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{thr_i<sp/>}&quot;</highlight><highlight class="normal">,vec_1<sp/>(<sp/>2+1<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>thrg<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{thr_g<sp/>}&quot;</highlight><highlight class="normal">,vec_1<sp/>(<sp/>3+1<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Setup<sp/>values</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//ARX<sp/>constructor</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0<sp/>=<sp/>0.001*eye<sp/>(<sp/>thri.count()<sp/>);<sp/>V0<sp/>(<sp/>0,0<sp/>)<sp/>*=<sp/>10;<sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>mat<sp/>V0g<sp/>=<sp/>0.001*eye<sp/>(<sp/>thrg.count()<sp/>);<sp/>V0g<sp/>(<sp/>0,0<sp/>)<sp/>*=<sp/>10;<sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>nu0<sp/>=<sp/>ord+1;</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>frg<sp/>=<sp/>0.99;</highlight></codeline>
<codeline lineno="33"><highlight class="normal"></highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX" kindref="compound" tooltip="Linear Autoregressive model with Gaussian noise.">ARX</ref><sp/>P1<sp/>(<sp/>thri,<sp/>V0,<sp/>nu0,<sp/>frg<sp/>);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX" kindref="compound" tooltip="Linear Autoregressive model with Gaussian noise.">ARX</ref><sp/>P2<sp/>(<sp/>thri,<sp/>V0,<sp/>nu0,<sp/>frg<sp/>);</highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classARX" kindref="compound" tooltip="Linear Autoregressive model with Gaussian noise.">ARX</ref><sp/>PG<sp/>(<sp/>thrg,<sp/>V0g,<sp/>nu0,<sp/>frg<sp/>);</highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Test<sp/>estimation</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>ndat<sp/>=<sp/>10000;</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>t;</highlight></codeline>
<codeline lineno="40"><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Logging</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="classdirfilelog" kindref="compound" tooltip="Logging into dirfile with buffer in memory.">dirfilelog</ref><sp/>L<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;exp/merg&quot;</highlight><highlight class="normal">,ndat<sp/>);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"></highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Eth1_log<sp/>=<sp/>L.add<sp/>(<sp/>thri,</highlight><highlight class="stringliteral">&quot;P1&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Eth2_log<sp/>=<sp/>L.add<sp/>(<sp/>thri,</highlight><highlight class="stringliteral">&quot;P2&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Ethg_log<sp/>=<sp/>L.add<sp/>(<sp/>thrg,</highlight><highlight class="stringliteral">&quot;PG&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="47"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>Data_log<sp/>=<sp/>L.add<sp/>(<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{Y<sp/>U1<sp/>U2<sp/>}&quot;</highlight><highlight class="normal"><sp/>),<sp/></highlight><highlight class="stringliteral">&quot;&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>LL_log<sp/><sp/><sp/>=<sp/>L.add<sp/>(<sp/><ref refid="classRV" kindref="compound" tooltip="Class representing variables, most often random variables.">RV</ref><sp/>(<sp/></highlight><highlight class="stringliteral">&quot;{1<sp/>2<sp/>G<sp/>}&quot;</highlight><highlight class="normal"><sp/>),<sp/></highlight><highlight class="stringliteral">&quot;LL&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="49"><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.init();</highlight></codeline>
<codeline lineno="51"><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>Yt<sp/>(<sp/>ndat<sp/>);</highlight></codeline>
<codeline lineno="53"><highlight class="normal"></highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Yt.set_subvector<sp/>(<sp/>0,randn<sp/>(<sp/>ord<sp/>)<sp/>);<sp/></highlight><highlight class="comment">//initial<sp/>values</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>rgrg<sp/>(<sp/>thg.length()<sp/>);</highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>vec<sp/>rgri<sp/>(<sp/>thri.count()<sp/>);</highlight></codeline>
<codeline lineno="57"><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(<sp/>t=0;<sp/>t&lt;ndat;<sp/>t++<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>True<sp/>system</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>t&gt;0<sp/>)<sp/>{</highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgrg<sp/>(<sp/>0<sp/>)<sp/>=Yt<sp/>(<sp/>t-1<sp/>);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgrg<sp/>(<sp/>1<sp/>)<sp/>=<sp/>pow(sin<sp/>(<sp/>(<sp/>t/40.0<sp/>)<sp/>*pi<sp/>),3);</highlight></codeline>
<codeline lineno="63"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgrg<sp/>(<sp/>2<sp/>)<sp/>=<sp/>pow(cos<sp/>(<sp/>(<sp/>t/40.0<sp/>)<sp/>*pi<sp/>),3);</highlight></codeline>
<codeline lineno="64"><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Yt<sp/>(<sp/>t<sp/>)<sp/>=<sp/>thg*rgrg<sp/>+<sp/>sqr<sp/>*<sp/>NorRNG();</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>1st</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>0<sp/>)<sp/>=Yt<sp/>(<sp/>t<sp/>);</highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>1<sp/>)<sp/>=Yt<sp/>(<sp/>t-1<sp/>);</highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>2<sp/>)<sp/>=rgrg<sp/>(<sp/>1<sp/>);</highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>P1.bayes<sp/>(<sp/>rgri<sp/>);</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>2nd</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>rgri<sp/>(<sp/>2<sp/>)<sp/>=rgrg<sp/>(<sp/>2<sp/>);</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>P2.bayes<sp/>(<sp/>rgri<sp/>);</highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Global</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>PG.bayes<sp/>(<sp/>concat<sp/>(<sp/>Yt<sp/>(<sp/>t<sp/>),rgrg<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Merger</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Eth1_log,<sp/>P1._epdf().mean()<sp/>);</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Eth2_log,<sp/>P2._epdf().mean()<sp/>);</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Ethg_log,<sp/>PG._epdf().mean()<sp/>);</highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>Data_log,<sp/>vec_3<sp/>(<sp/>Yt<sp/>(<sp/>t<sp/>),<sp/>rgrg<sp/>(<sp/>1<sp/>),<sp/>rgrg<sp/>(<sp/>2<sp/>)<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.logit<sp/>(<sp/>LL_log,<sp/>vec_3<sp/>(<sp/>P1._ll(),<sp/>P2._ll(),<sp/>PG._ll()<sp/>)<sp/>);</highlight></codeline>
<codeline lineno="86"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.step<sp/>(<sp/><sp/>);</highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.finalize(<sp/>);</highlight></codeline>
<codeline lineno="89"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>L.itsave<sp/>(<sp/></highlight><highlight class="stringliteral">&quot;merg.it&quot;</highlight><highlight class="normal"><sp/>);</highlight></codeline>
<codeline lineno="90"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="/home/smidl/work/git/mixpp/mpdm/merg_pred.cpp"/>
  </compounddef>
</doxygen>
