Revision 32, 0.7 kB
(checked in by smidl, 17 years ago)
|
test KF : estimation of R in KF is not possible! Likelihood of y_t is growing when R -> 0
|
Line | |
---|
1 | #include <itpp/itbase.h> |
---|
2 | #include <stat/libEF.h> |
---|
3 | |
---|
4 | using namespace itpp; |
---|
5 | |
---|
6 | //These lines are needed for use of cout and endl |
---|
7 | using std::cout; |
---|
8 | using std::endl; |
---|
9 | |
---|
10 | |
---|
11 | int main() { |
---|
12 | |
---|
13 | vec x = "-10:0.1:10"; |
---|
14 | vec y = "-10:0.1:10"; |
---|
15 | |
---|
16 | RV rv ( "1","{x }","2","0" ); |
---|
17 | vec mu0 = "0.0 0.0"; |
---|
18 | mat V0 ( "5 -0.05; -0.05 5.20" ); |
---|
19 | fsqmat R = fsqmat ( V0 ); |
---|
20 | |
---|
21 | cout << "====== ENorm ====== " <<endl; |
---|
22 | enorm<fsqmat> eN ( rv ); |
---|
23 | eN.set_parameters ( mu0,R ); |
---|
24 | vec pdf = zeros ( x.length() ); |
---|
25 | |
---|
26 | vec pom ( 2 ); |
---|
27 | double suma=0.0; |
---|
28 | |
---|
29 | for ( int i=0;i<x.length();i++ ) { |
---|
30 | for ( int j=0;j<y.length();j++ ) { |
---|
31 | pom ( 0 ) = x ( i ); |
---|
32 | pom ( 1 ) = y ( j ); |
---|
33 | suma+= eN.eval ( pom ); |
---|
34 | } |
---|
35 | } |
---|
36 | |
---|
37 | cout << suma <<endl; |
---|
38 | |
---|
39 | //Exit program: |
---|
40 | return 0; |
---|
41 | |
---|
42 | } |
---|