22 cout <<
"*************************************************" << endl;
23 cout <<
"* Principal Component Analysis *" << endl;
24 cout <<
"* *" << endl;
25 cout <<
"* Number of variables: " << setw(4) <<
n
27 cout <<
"* Number of data points: " << setw(8) <<
m
29 cout <<
"* Number of dependent variables: " << setw(4) <<
c
31 cout <<
"* *" << endl;
32 cout <<
"*************************************************" << endl;
48 for (
Int_t i = 0; i <
m; i++) {
52 for (
Int_t j = 0; j <
n -
c; j++) {
53 if (j % 3 == 0) data[j] = randumNum->
Gaus(5,1);
54 else if (j % 3 == 1) data[j] = randumNum->
Poisson(8);
55 else data[j] = randumNum->
Exp(2);
59 for (
Int_t j = 0 ; j <
c; j++) {
61 for (
Int_t k = 0; k <
n -
c - j; k++) data[
n -
c + j] += data[k];
Using a TBrowser one can browse all ROOT objects.
Principal Components Analysis (PCA)
This is the base class for the ROOT Random number generators.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
virtual Int_t Poisson(Double_t mean)
Generates a random integer N according to a Poisson law.
virtual Double_t Exp(Double_t tau)
Returns an exponential deviate.