root/library/tests/arx_straux_test.cpp @ 622

Revision 607, 0.9 kB (checked in by smidl, 15 years ago)

test for ticket 12 is now part of testsuite - see tests/arx_straux_test.cpp

Line 
1#include "estim/arx.h"
2#include "mat_checks.h"
3
4using namespace bdm;
5
6TEST(test_arx_straux){
7mat A="[   0.8147    0.9134    0.2785;"
8    "0.9058    0.6324    0.5469;"
9    "0.1270    0.0975    0.9575]";
10
11mat B="[0.9649    0.9572    0.1419;"
12    "0.1576    0.4854    0.4218;"
13    "0.9706    0.8003    0.9157]";
14//when updateing matrices do not forget to update CHECK_EQUAL below!!!
15       
16ldmat Ld0(A);
17ldmat Ld1(A+B);
18
19ivec belief = vec_1(2);           // default belief
20int nbest = 3;           // nbest: how many regressors are returned
21int nrep = 5;         // nrep: number of random repetions of structure estimation
22double lambda   = 0.9; 
23int k=2;
24
25//[strout, rgrsout, statistics] =
26//          straux1(L, d, nu, L0, d0, nu0, belief, nbest, max_nrep, lambda,
27//          order_k);
28ivec o2;
29ivec o1 = straux1(Ld1,20, Ld0, 10,  belief, nbest, nrep, lambda, k, o2);
30
31
32CHECK_EQUAL(ivec("2 3"), o1);
33
34}
Note: See TracBrowser for help on using the browser.