-
Notifications
You must be signed in to change notification settings - Fork 5
03. Eigen Decomposition ‐ PCA
Kamil edited this page Dec 12, 2024
·
2 revisions
PCA or Eigen Decomposition is turned off by default. PCA is being enabled based on the cosntuctor. This is default no PCA consutvcosntuctorotr.
std::vector<std::string> xsecCovMatrixFile = FitManager->raw()["General"]["Systematics"]["XsecCovFile"].as<std::vector<std::string>>();
xsec = new covarianceXsec(xsecCovMatrixFile);
To enable it it should look like it
std::vector<std::string> xsecCovMatrixFile = FitManager->raw()["General"]["Systematics"]["XsecCovFile"].as<std::vector<std::string>>();
double PCAthreshold = 0.00001;
xsec = new covarianceXsec(xsecCovMatrixFile, PCAthreshold);
This threshold indicates which eigen value to remove and reduce fit dimensionality. If you set the threhsold very low you may not remove anything just to run with the decomposed matrix.
It is also possible to decompose only part of the matrix
std::vector<std::string> xsecCovMatrixFile = FitManager->raw()["General"]["Systematics"]["XsecCovFile"].as<std::vector<std::string>>();
double PCAthreshold = 0.00001;
int FirstPCAdpar = 8;
int LastPCAdpar = 108
xsec = new covarianceXsec(xsecCovMatrixFile, PCAthreshold, FirstPCAdpar, LastPCAdpar) ;
This way parameters through 8-108 will be decomposed while 0-8 will be in undecomposed base. You can see transition matrix between normal and eigen base below:
The MaCh3 Collaboration