Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
CovarianceTransformer Class Reference

Builds correlation tables/matrices from parameter or observable collections. More...

#include <CovarianceTransformer.h>

Public Member Functions

 CovarianceTransformer (std::shared_ptr< IStatCorrelationProxy > corr_proxy, std::shared_ptr< IStatParameterProxy > par_proxy)
 Constructs a covariance transformer.
 
std::vector< std::vector< double > > transform (const std::vector< ParamId > &ids)
 Builds a dense correlation matrix for a list of parameters.
 
std::map< ParamId, std::map< ParamId, double > > transform (const std::map< ParamId, double > &ids)
 Builds an associative correlation map for a set of parameters.
 
std::vector< std::vector< double > > transform (const std::vector< ExperimentObs > &ids)
 Builds a dense correlation matrix for a list of fully explicit experiment-scoped observables.
 
std::map< ExperimentObs, std::map< ExperimentObs, double > > transform (const std::map< ExperimentObs, double > &ids)
 Builds an associative correlation map for a set of fully explicit experiment-scoped observables.
 
std::map< BinnedObservableId, std::map< BinnedObservableId, double > > transform (const std::string &experiment, const std::map< BinnedObservableId, double > &ids)
 Builds an associative correlation map for a set of binned observables belonging to the same experiment.
 
std::vector< std::vector< double > > transform (const std::string &experiment, const std::vector< BinnedObservableId > &ids)
 Builds a dense correlation matrix for a list of binned observables belonging to the same experiment.
 
std::vector< ParamIdcheck_if_corr (const std::vector< ParamId > &ids)
 Filters a parameter list, keeping only entries with positive combined uncertainty.
 

Detailed Description

Builds correlation tables/matrices from parameter or observable collections.

This transformer is a thin utility layer used by the statistics code to assemble correlation structures suitable for downstream covariance/copula construction.

It does not store any correlation data itself; instead, it delegates all lookups to:

Definition at line 50 of file CovarianceTransformer.h.

Constructor & Destructor Documentation

◆ CovarianceTransformer()

CovarianceTransformer::CovarianceTransformer ( std::shared_ptr< IStatCorrelationProxy corr_proxy,
std::shared_ptr< IStatParameterProxy par_proxy 
)
inline

Constructs a covariance transformer.

Parameters
corr_proxyProxy used to retrieve correlation coefficients.
par_proxyProxy used to retrieve parameter uncertainties.

Definition at line 58 of file CovarianceTransformer.h.

Member Function Documentation

◆ check_if_corr()

std::vector< ParamId > CovarianceTransformer::check_if_corr ( const std::vector< ParamId > &  ids)

Filters a parameter list, keeping only entries with positive combined uncertainty.

A parameter is kept if (*par_proxy)(elem, DataType::STD_COMBINED) > 0.

Parameters
idsInput parameter list.
Returns
Filtered list of parameters considered correlated / relevant.

Definition at line 98 of file CovarianceTransformer.cpp.

◆ transform() [1/6]

std::map< ExperimentObs, std::map< ExperimentObs, double > > CovarianceTransformer::transform ( const std::map< ExperimentObs, double > &  ids)

Builds an associative correlation map for a set of fully explicit experiment-scoped observables.

The values of the input map are ignored; only the keys are used to define the observable set over which the correlation structure is constructed.

Parameters
idsMap whose keys define the experiment-scoped observable set.
Returns
Nested map of combined correlations.

Definition at line 50 of file CovarianceTransformer.cpp.

◆ transform() [2/6]

std::map< ParamId, std::map< ParamId, double > > CovarianceTransformer::transform ( const std::map< ParamId, double > &  ids)

Builds an associative correlation map for a set of parameters.

The values of the input map are ignored; only the keys are used to define the parameter set over which the correlation structure is constructed.

Parameters
idsMap whose keys define the parameter set.
Returns
Nested map of combined correlations.

Definition at line 19 of file CovarianceTransformer.cpp.

◆ transform() [3/6]

std::map< BinnedObservableId, std::map< BinnedObservableId, double > > CovarianceTransformer::transform ( const std::string &  experiment,
const std::map< BinnedObservableId, double > &  ids 
)

Builds an associative correlation map for a set of binned observables belonging to the same experiment.

This is a convenience overload around the ExperimentObs-based API.

Parameters
experimentExperiment name used to scope all observables.
idsMap whose keys define the observable set.
Returns
Nested map of combined correlations.

Definition at line 65 of file CovarianceTransformer.cpp.

◆ transform() [4/6]

std::vector< std::vector< double > > CovarianceTransformer::transform ( const std::string &  experiment,
const std::vector< BinnedObservableId > &  ids 
)

Builds a dense correlation matrix for a list of binned observables belonging to the same experiment.

This is a convenience overload around the ExperimentObs-based API.

Parameters
experimentExperiment name used to scope all observables.
idsOrdered list of binned observable identifiers.
Returns
Dense square matrix of combined correlations.

Definition at line 81 of file CovarianceTransformer.cpp.

◆ transform() [5/6]

std::vector< std::vector< double > > CovarianceTransformer::transform ( const std::vector< ExperimentObs > &  ids)

Builds a dense correlation matrix for a list of fully explicit experiment-scoped observables.

The output matrix is ordered according to the input vector. Entry (i,j) contains the combined correlation between ids[i] and ids[j].

Parameters
idsOrdered list of experiment-scoped observable identifiers.
Returns
Dense square matrix of combined correlations.

Definition at line 34 of file CovarianceTransformer.cpp.

◆ transform() [6/6]

std::vector< std::vector< double > > CovarianceTransformer::transform ( const std::vector< ParamId > &  ids)

Builds a dense correlation matrix for a list of parameters.

The output matrix is ordered according to the input vector. Entry (i,j) contains the combined correlation between ids[i] and ids[j].

Parameters
idsOrdered list of parameter identifiers.
Returns
Dense square matrix of combined correlations.

Definition at line 3 of file CovarianceTransformer.cpp.


The documentation for this class was generated from the following files: