I'm using TPrincipal class in data analysis with root version
3.01/05. I'm storing my TPrincipal object in a file, which you can load
here :
http://www.phenix.bnl.gov/~camard/rootobject/
This file is called principal.root.
When I want to print the PCA result via
"principal->Print("MSEV")", with root version 3.01/05, the result is the
following :
root [0] TFile f("principal.root")
root [1] .ls
TFile** principal.root
TFile* principal.root
KEY: TPrincipal principal;1
root [2] principal->Print("MSEV")
Variable # | Mean Value | Sigma | Eigenvalue
-------------+------------+------------+------------
1 | 5.437 | 1.601 | 0.7393
2 | 4.686 | 7.723 | 0.1798
3 | 0.5313 | 0.172 | 0.0809
Eigenvector # 1
Vector 3 is as follows
| 1 |
------------------
1 | -0.6107
2 | -0.5912
3 | 0.5268
Eigenvector # 2
Vector 3 is as follows
| 1 |
------------------
1 | -0.264
2 | -0.4753
3 | -0.8393
Eigenvector # 3
Vector 3 is as follows
| 1 |
------------------
1 | 0.7466
2 | -0.6516
3 | 0.1342
root [3] .q
And as you can see, everything is correct. But when I want to do
exactly the same thing with the version 3.03/08, I see a problem :
root [0] TFile f("principal.root")
root [1] .ls
TFile** principal.root
TFile* principal.root
KEY: TPrincipal principal;1
root [2] principal->Print("MSEV")
Variable # | Mean Value | Sigma | Eigenvalue
-------------+------------+------------+------------
0 Error in <TVectorD::operator()>: requested element 0 is out
of vector boundaries [1,3]
| 0 Error in <TVectorD::operator()>: requested element 0 is out
of vector boundaries [1,3]
| 0 Error in <TVectorD::operator()>: requested element 0 is out
of vector boundaries [1,3]
| 0
1 | 5.437 | 1.601 | 0.7393
2 | 4.686 | 7.723 | 0.1798
Eigenvector # 0Error in <TMatrixDColumn::TMatrixDColumn>: column #0 is not
within the matrix
Error in <TVectorD::operator=(const TMatrixDColumn&)>: can't assign a
column of the matrix to the vector
Vector 3 is as follows
| 1 |
------------------
0 | 0
1 | 0
2 | 0
Eigenvector # 1Error in <TVectorD::operator=(const
TMatrixDColumn&)>: can't assign a column of the matrix to the vector
Vector 3 is as follows
| 1 |
------------------
0 | 0
1 | 0
2 | 0
Eigenvector # 2Error in <TVectorD::operator=(const
TMatrixDColumn&)>: can't assign a column of the matrix to the vector
Vector 3 is as follows
| 1 |
------------------
0 | 0
1 | 0
2 | 0
root [3] .q
I don't know what to do to print the good result with root version
3.03/08.
Thank you.
* Xavier CAMARD *
* SUBATECH, Ecole des Mines de Nantes *
* 4, rue Alfred Kastler *
* BP 20722 - 44307 Nantes Cedex 03 *
* e-mail: camard@subatech.in2p3.fr *
* tel:(33)(0)2 51 85 84 65 (France) *
* fax:(33)(0)2 51 85 84 24 (France) *
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:21 MET