Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

batch-analyzer.cpp

Go to the documentation of this file.
00001 #include <iostream>
00002 #include <matrix/newmatio.h>
00003 #include <matrix/newmat.h>
00004 #include <matrix/newmatap.h>
00005 #include <list>
00006 #include <ExampleModel.h>
00007 #include <Analyzer.h>
00008 #include <stdio.h>
00009 
00010 
00011 int main()
00012 {
00013   Matrix data(2, 10);
00014   Real temp[] = { 2.5, 0.5, 2.2, 1.9, 3.1, 2.3, 2, 1, 1.5, 1.1, 2.4, 0.7, 2.9, 2.2, 3.0, 2.7, 1.6, 1.1, 1.6, 0.9 };
00015   data << temp;
00016 
00017 
00018   Analyzer pca;
00019   
00020   pca.setData(data);
00021   printf("setData done\n");
00022   pca.mean(data);
00023   printf("mean done\n");
00024   pca.adjust();
00025   printf("adjust done\n");
00026   pca.covariance();
00027   printf("covariance done\n");
00028   pca.findComponents();
00029   printf("finding done\n");
00030   pca.computeEnergy();
00031   printf("compute energy done\n");
00032   pca.selectComponents();
00033   printf("select components done\n");
00034   pca.getTransformationMatrix();
00035 
00036 
00037   //Application to test the Analyzer - should be expanded to a batch program.
00038 }

Generated on Tue Apr 17 09:39:11 2007 for PCG Library by  doxygen 1.3.9.1