In[]:=
(*transformatimeserisetoaHankelMatrix*)​​p={0.9850834511767809,0.6981795350860918,0.8704390414325982,0.870299537220976,0.9276171291064985,0.8129727018393593,1.0425590345633107};​​m=Length[p];​​n=3;​​l=m-n+1;​​f=Table[1,{i,1,n},{j,1,l}];​​For[i=1,i≤n,i++,For[j=1,j≤l,j++,​​f[[i,j]]=p[[i+j-1]]]];​​Print["f=",Table[f[[i,j]],{i,1,n},{j,1,l}]//MatrixForm]​​
f=
0.985083
0.69818
0.870439
0.8703
0.927617
0.69818
0.870439
0.8703
0.927617
0.812973
0.870439
0.8703
0.927617
0.812973
1.04256
In[]:=
c=f.f;​​c//MatrixForm
Out[]//MatrixForm=
3.8334
3.61446
3.94714
3.61446
3.52394
3.77427
3.94714
3.77427
4.12341
In[]:=
(* calcute a svd os covariance matrix*)​​{rho,lam,vec}=SingularValueDecomposition[N[c]];​​rho//MatrixForm​​lam//MatrixForm​​vec//MatrixForm​​
Out[]//MatrixForm=
-0.577623
0.638715
-0.508325
-0.553026
-0.764227
-0.331841
-0.600428
0.0894383
0.794661
Out[]//MatrixForm=
11.3969
0.
0.
0.
0.0613856
0.
0.
0.
0.0224341
Out[]//MatrixForm=
-0.577623
0.638715
-0.508325
-0.553026
-0.764227
-0.331841
-0.600428
0.0894383
0.794661
In[]:=
m0=Table[1,n];​​Do[m0[[i]]=Power[rho[[i]][[j]],2],{i,1,n},{j,1,n}];​​m0
Out[]=
{0.258395,0.110119,0.631487}
In[]:=
mu0=Table[1,n];​​Domu0[[i]]=
n
∑
i=1
p[[i]]
n
,{i,1,n};​​mu0
Out[]=
{0.57735,0.57735,0.57735}
In[]:=
q=Table[1,n];​​ Do[q[[i]]=Power[(rho[[i]][[j+1]]-rho[[i]][[j]]),2],{i,1,n},{j,1,n-1}];​​ q​​
Out[]=
{1.3157,0.186958,0.49734}
In[]:=
m1=Table[0,{i,1,n}];​​Dom1[[i]]=
n
∑
i=1
q[[i]]
n-1
,{i,n};​​m1
Out[]=
{1.,1.,1.}
In[]:=
loc=Table[0,n];​​Do[loc[[i]]=m1[[i]]/m0[[i]] ,{i,1,n}];​​loc
Out[]=
{3.87005,9.08112,1.58356}
In[]:=
product=Do[Times[rho[[;;,i]],Transpose[rho[[;;,i]]]],{i,1,n}]​​Times[rho[[;;,1]],Transpose[rho[[;;,1]]]]​​r=rho[[;;,1]]//MatrixForm​​rtranspose=Transpose[rho[[;;,1]]]//MatrixForm
Out[]=
{0.333648,0.305838,0.360514}
Out[]//MatrixForm=
-0.577623
-0.553026
-0.600428
Out[]//MatrixForm=
-0.577623
-0.553026
-0.600428
In[]:=
prof=rtranspose.r
Out[]=
-0.577623
-0.553026
-0.600428
.
-0.577623
-0.553026
-0.600428
In[]:=
Outer[r.r]
Out[]=
-0.577623
-0.553026
-0.600428
.
-0.577623
-0.553026
-0.600428
[]
fk=For[i=1,i<=n,i++,​​Times[ρ[[;;,i]],Transpose[ρ[[;;,i]]]].f]