NAGASH
0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
include
NAGASH
PCATool.h
Go to the documentation of this file.
1
//***************************************************************************************
4
//***************************************************************************************
5
6
#pragma once
7
8
#include "
NAGASH/Global.h
"
9
#include "
NAGASH/MSGTool.h
"
10
#include "
NAGASH/Tool.h
"
11
#include "Eigen/Dense"
12
13
namespace
NAGASH
14
{
23
class
PCATool
:
public
Tool
24
{
25
public
:
26
PCATool
(std::shared_ptr<MSGTool> MSG,
int
size);
27
28
void
SetObservable
(
int
index,
double
val);
29
void
SetCovariance
(
int
index_i,
int
index_j,
double
cov);
30
void
SetUncertainty
(
int
index,
double
unc);
31
// These functions will set isProcessed to false
32
// If unc or cov not set then it is set to be 0
33
34
// These functions will check isProcessed
35
// if it not processed then call function
36
// Processed
37
int
GetNPCAVariation
();
38
double
GetPCAResult
(
int
ivar,
int
index,
double
nsigma);
39
double
GetPCAResult
(
int
index);
40
double
GetPCAUpVariation
(
int
ivar,
int
index);
41
double
GetPCADownVariation
(
int
ivar,
int
index);
42
double
GetEigenValue
(
int
ivar);
43
44
private
:
45
bool
isProcessed
=
false
;
46
47
void
Process
();
48
49
Eigen::MatrixXd
Covariance_Matrix
;
50
Eigen::MatrixXd
Transform_Matrix
;
51
Eigen::MatrixXd
New_Covariance_Matrix
;
52
53
Eigen::VectorXd
Observable_Vector
;
54
Eigen::VectorXd
New_Observable_Vector
;
55
56
Eigen::VectorXd
EigenValue
;
57
58
std::vector<Eigen::VectorXd>
New_Observable_UpVariations
;
59
std::vector<Eigen::VectorXd>
New_Observable_DownVariations
;
60
61
int
NVariation
= -1;
62
int
Size
= 0;
63
};
64
}
// namespace NAGASH
Global.h
Some global definitions.
MSGTool.h
Tool.h
NAGASH::PCATool
PCATool : Principal Component Analysis (PCA)
Definition
PCATool.h:24
NAGASH::PCATool::NVariation
int NVariation
Definition
PCATool.h:61
NAGASH::PCATool::GetPCADownVariation
double GetPCADownVariation(int ivar, int index)
Definition
PCATool.cxx:220
NAGASH::PCATool::Observable_Vector
Eigen::VectorXd Observable_Vector
Definition
PCATool.h:53
NAGASH::PCATool::GetEigenValue
double GetEigenValue(int ivar)
Definition
PCATool.cxx:225
NAGASH::PCATool::Covariance_Matrix
Eigen::MatrixXd Covariance_Matrix
Definition
PCATool.h:49
NAGASH::PCATool::Size
int Size
Definition
PCATool.h:62
NAGASH::PCATool::GetPCAResult
double GetPCAResult(int ivar, int index, double nsigma)
Definition
PCATool.cxx:167
NAGASH::PCATool::New_Observable_UpVariations
std::vector< Eigen::VectorXd > New_Observable_UpVariations
Definition
PCATool.h:58
NAGASH::PCATool::SetObservable
void SetObservable(int index, double val)
Definition
PCATool.cxx:21
NAGASH::PCATool::isProcessed
bool isProcessed
Definition
PCATool.h:45
NAGASH::PCATool::SetUncertainty
void SetUncertainty(int index, double unc)
Definition
PCATool.cxx:53
NAGASH::PCATool::Process
void Process()
Definition
PCATool.cxx:59
NAGASH::PCATool::GetPCAUpVariation
double GetPCAUpVariation(int ivar, int index)
Definition
PCATool.cxx:215
NAGASH::PCATool::EigenValue
Eigen::VectorXd EigenValue
Definition
PCATool.h:56
NAGASH::PCATool::SetCovariance
void SetCovariance(int index_i, int index_j, double cov)
Definition
PCATool.cxx:32
NAGASH::PCATool::Transform_Matrix
Eigen::MatrixXd Transform_Matrix
Definition
PCATool.h:50
NAGASH::PCATool::New_Covariance_Matrix
Eigen::MatrixXd New_Covariance_Matrix
Definition
PCATool.h:51
NAGASH::PCATool::GetNPCAVariation
int GetNPCAVariation()
Definition
PCATool.cxx:160
NAGASH::PCATool::New_Observable_DownVariations
std::vector< Eigen::VectorXd > New_Observable_DownVariations
Definition
PCATool.h:59
NAGASH::PCATool::New_Observable_Vector
Eigen::VectorXd New_Observable_Vector
Definition
PCATool.h:54
NAGASH::Tool
Provide interface for all tools in NAGASH.
Definition
Tool.h:72
NAGASH
Definition
Analysis.h:232
Generated on Mon Sep 2 2024 14:24:32 for NAGASH by
1.9.8