npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::KernelSensitivityCalculator Class Reference

Public Member Functions

template<class Kernel >
 KernelSensitivityCalculator (const Kernel &kernel, const AbsDistribution1D &distro, unsigned maxdegInputPoly, unsigned maxdegOutPoly, long double ymin, long double ymax, const AbsIntervalQuadrature1D &xIntegrator, const AbsIntervalQuadrature1D &yIntegrator, bool normalizeKernel=true, bool validateCDF=true)
 
template<class Kernel >
 KernelSensitivityCalculator (const Kernel &kernel, const std::vector< double > &sample, unsigned maxdegInputPoly, unsigned maxdegOutPoly, long double ymin, long double ymax, const AbsIntervalQuadrature1D &yIntegrator, bool normalizeKernel=true, bool validateCDF=true)
 
bool isOracle () const
 
unsigned maxdegInputPoly () const
 
unsigned maxdegOutPoly () const
 
template<class InPoly , class OutPoly >
Matrix< double > sMatrix0 (const InPoly &inputPoly, const OutPoly &outPoly) const
 
template<class InPoly , class KDECdf >
Matrix< double > sMatrix1 (const InPoly &inputPoly, const KDECdf &cdf) const
 
template<class OutPoly >
Matrix< double > sMatrix2 (const OutPoly &outPoly) const
 
template<class KDECdf >
Matrix< double > sMatrix3 (const KDECdf &cdf) const
 

Constructor & Destructor Documentation

◆ KernelSensitivityCalculator() [1/2]

template<class Kernel >
npstat::KernelSensitivityCalculator::KernelSensitivityCalculator ( const Kernel &  kernel,
const AbsDistribution1D distro,
unsigned  maxdegInputPoly,
unsigned  maxdegOutPoly,
long double  ymin,
long double  ymax,
const AbsIntervalQuadrature1D xIntegrator,
const AbsIntervalQuadrature1D yIntegrator,
bool  normalizeKernel = true,
bool  validateCDF = true 
)

Oracle constructor. Arguments are as follows:

kernel The kernel functor, K(x,y). Must have a method with a signature similar to "double operator()(double x, double y) const".

distro The oracle distribution.

maxdegInputPoly Maximum degree of P_k(x) polynomials.

maxdegOutPoly Maximum degree of Q_j(y) polynomials.

ymin, ymax The interval on which the KDE of the oracle density is supported.

xIntegrator Numerical quadrature object for calculating integrals in x.

yIntegrator Numerical quadrature object for calculating integrals in y.

normalizeKernel Set this to "true" in order to normalize the kernel internally so that Integral K(x,y) dy = 1 for every x. Set this to "false" if the kernel is already normalized.

◆ KernelSensitivityCalculator() [2/2]

template<class Kernel >
npstat::KernelSensitivityCalculator::KernelSensitivityCalculator ( const Kernel &  kernel,
const std::vector< double > &  sample,
unsigned  maxdegInputPoly,
unsigned  maxdegOutPoly,
long double  ymin,
long double  ymax,
const AbsIntervalQuadrature1D yIntegrator,
bool  normalizeKernel = true,
bool  validateCDF = true 
)

Non-oracle constructor. Arguments are as follows:

kernel The kernel functor, K(x,y). Must have a method with a signature similar to "double operator()(double x, double y) const".

sample The sample of points on which to perform KDE.

maxdegInputPoly Maximum degree of P_k(x) polynomials.

maxdegOutPoly Maximum degree of Q_j(y) polynomials.

ymin, ymax The interval on which the KDE is supported.

yIntegrator Numerical quadrature object for calculating integrals in y.

normalizeKernel Set this to "true" in order to normalize the kernel internally so that Integral K(x,y) dy = 1 for every x. Set this to "false" if the kernel is already normalized.

validateCDF If "true", the code will check that all values of the KDE cumulative distribution function belong to the [0, 1] interval and will throw an exception if this is not the case. If "false", this check will not be performed.

Member Function Documentation

◆ sMatrix0()

template<class InPoly , class OutPoly >
Matrix<double> npstat::KernelSensitivityCalculator::sMatrix0 ( const InPoly &  inputPoly,
const OutPoly &  outPoly 
) const

Return the "standard" kernel sensitivity matrix.

"inputPoly" is the OPS orthonormal with the weight "distro" (oracle case) or with the discrete measure generated by the sample (non-oracle case).

"outPoly" is the OPS orthonormal with the weight given by the KDE density.

◆ sMatrix1()

template<class InPoly , class KDECdf >
Matrix<double> npstat::KernelSensitivityCalculator::sMatrix1 ( const InPoly &  inputPoly,
const KDECdf &  cdf 
) const

Return the kernel sensitivity matrix that uses comparison density in y.

"inputPoly" is the OPS orthonormal with the weight "distro" (oracle case) or with the discrete measure generated by the sample (non-oracle case).

"cdf" is the functor that returns the cumulative distribution function for the KDE density.

◆ sMatrix2()

template<class OutPoly >
Matrix<double> npstat::KernelSensitivityCalculator::sMatrix2 ( const OutPoly &  outPoly) const

Return the kernel sensitivity matrix that uses comparison density in x.

"outPoly" is the OPS orthonormal with the weight given by the KDE density.

◆ sMatrix3()

template<class KDECdf >
Matrix<double> npstat::KernelSensitivityCalculator::sMatrix3 ( const KDECdf &  cdf) const

Return the kernel sensitivity matrix that uses comparison density in both x and y.

"cdf" is the functor that returns the cumulative distribution function for the KDE density.


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