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

#include <LocalPolyFilter1D.hh>

Inheritance diagram for npstat::LocalPolyFilter1D:
npstat::AbsPolyFilter1D npstat::DummyLocalPolyFilter1D

Public Member Functions

 LocalPolyFilter1D (const double *taper, unsigned maxDegree, const AbsFilter1DBuilder &filterBuilder, unsigned dataLen)
 
 LocalPolyFilter1D (const LocalPolyFilter1D &)
 
LocalPolyFilter1Doperator= (const LocalPolyFilter1D &)
 
bool operator== (const LocalPolyFilter1D &r) const
 
bool operator!= (const LocalPolyFilter1D &r) const
 
double taper (unsigned degree) const
 
unsigned maxDegree () const
 
unsigned dataLen () const
 
const std::vector< double > & getBandwidthFactors () const
 
double selfContribution (unsigned binNumber) const
 
const PolyFilter1DgetFilter (unsigned binNumber) const
 
template<typename Tin , typename Tout >
void filter (const Tin *in, unsigned dataLen, Tout *out) const
 
template<typename Tin , typename Tout >
void convolve (const Tin *in, unsigned dataLen, Tout *out) const
 
Matrix< double > getFilterMatrix () const
 
CPP11_auto_ptr< LocalPolyFilter1DdoublyStochasticFilter (double tolerance, unsigned maxIterations) const
 
CPP11_auto_ptr< LocalPolyFilter1DeigenGroomedFilter () const
 
virtual gs::ClassId classId () const
 
virtual bool write (std::ostream &os) const
 

Static Public Member Functions

static const char * classname ()
 
static unsigned version ()
 
static LocalPolyFilter1Dread (const gs::ClassId &id, std::istream &in)
 

Detailed Description

This class performs local polynomial filtering in one dimension

Constructor & Destructor Documentation

◆ LocalPolyFilter1D()

npstat::LocalPolyFilter1D::LocalPolyFilter1D ( const double *  taper,
unsigned  maxDegree,
const AbsFilter1DBuilder filterBuilder,
unsigned  dataLen 
)

Main constructor. The arguments are as follows:

taper – Damping factors for each polynomial degree (starting with the 0th order term). This can be NULL in which case it is assumed that all factors are 1.

maxDegree – Maximum degree of the polynomials. The length of the "taper" array (if not NULL) must be equal to maxDegree + 1. Note that, far away from the boundaries (where the situation is symmetric) the same filter will be produced using the same taper with an even degree N and with an odd degree N+1. Near the boundaries the filter coefficients will, of course, differ in these two cases.

filterBuilder – An instance of a class which actually builds the filters when requested. This builder is used only inside the constructor.

dataLen – The length of the data arrays which will be used with this filter (this info is needed in order to take into account the boundary effects).

Member Function Documentation

◆ convolve()

template<typename Tin , typename Tout >
void npstat::LocalPolyFilter1D::convolve ( const Tin *  in,
unsigned  dataLen,
Tout *  out 
) const

A diffent filtering method in which the shapes of the kernels are determined by the positions of the "sources" (i.e., sample points) instead of the positions at which the density (or response) is estimated.

◆ dataLen()

unsigned npstat::LocalPolyFilter1D::dataLen ( ) const
inlinevirtual

Length of the data array

Implements npstat::AbsPolyFilter1D.

◆ doublyStochasticFilter()

CPP11_auto_ptr<LocalPolyFilter1D> npstat::LocalPolyFilter1D::doublyStochasticFilter ( double  tolerance,
unsigned  maxIterations 
) const

Generate a doubly stochastic filter out of this one. Such filters are useful for sequential copula smoothing. NULL pointer will be returned in case the requested margin tolerance is positive and can not be reached within the number of iterations allowed.

◆ eigenGroomedFilter()

CPP11_auto_ptr<LocalPolyFilter1D> npstat::LocalPolyFilter1D::eigenGroomedFilter ( ) const

An experimental filter with an adjusted eigenspectrum

◆ filter()

template<typename Tin , typename Tout >
void npstat::LocalPolyFilter1D::filter ( const Tin *  in,
unsigned  dataLen,
Tout *  out 
) const

This method performs the filtering. "dataLen", which is the length of both "in" and "out" arrays, must be the same as the one in the constructor.

◆ getFilter()

const PolyFilter1D& npstat::LocalPolyFilter1D::getFilter ( unsigned  binNumber) const

Get the filter coefficients for the given bin

◆ getFilterMatrix()

Matrix<double> npstat::LocalPolyFilter1D::getFilterMatrix ( ) const

Generate the complete (non-sparse) representation of the filter. It will be a generalized stochastic matrix (each row sums to 1).

◆ selfContribution()

double npstat::LocalPolyFilter1D::selfContribution ( unsigned  binNumber) const
virtual

Self contribution needed for cross-validation

Implements npstat::AbsPolyFilter1D.

◆ taper()

double npstat::LocalPolyFilter1D::taper ( unsigned  degree) const

Inspect object properties


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