npstat::LocalPolyFilterND< MaxDeg > Class Template Reference
Inheritance diagram for npstat::LocalPolyFilterND< MaxDeg >:
Detailed Descriptiontemplate<unsigned MaxDeg>
|
npstat::LocalPolyFilterND< MaxDeg >::LocalPolyFilterND | ( | const double * | taper, |
unsigned | maxDegree, | ||
const Array & | weight, | ||
bool | mirrorWeight, | ||
const ArrayShape & | dataShape | ||
) |
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 value must not exceed the "MaxDeg" template parameter. 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.
weight – The array of weights.
mirrorWeight – If true, the "weight" argument represents just one hyperoctant corresponding to positive directions in all dimensions. The remaining part of the weight should be generated by reflections. If false, the "weight" argument will not be mirrored. In the latter case, the maximum of the weight should be in the array center.
dataShape – The shape of the data arrays which will be processed by this filter
void npstat::LocalPolyFilterND< MaxDeg >::convolve | ( | const ArrIn & | in, |
ArrOut * | 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. Note that elements of "out" array themselves are used as result accumulators.
|
inlinevirtual |
Required shape of the data array
Implements npstat::AbsPolyFilterND.
|
inlinevirtual |
Inspect object properties
Implements npstat::AbsPolyFilterND.
void npstat::LocalPolyFilterND< MaxDeg >::filter | ( | const ArrIn & | in, |
ArrOut * | out | ||
) | const |
This method performs the filtering
const PolyFilterND& npstat::LocalPolyFilterND< MaxDeg >::getFilter | ( | const unsigned * | index, |
unsigned | lenIndex | ||
) | const |
Get the filter coefficients for the given grid point
Matrix<double> npstat::LocalPolyFilterND< MaxDeg >::getFilterMatrix | ( | ) | const |
Get the complete effective filter matrix
|
inline |
Check compatibility of an array with the filter
const PolyFilterND& npstat::LocalPolyFilterND< MaxDeg >::linearGetFilter | ( | unsigned long | index | ) | const |
Extract filter coefficients using linear grid index
|
virtual |
Contribution of a single point into the density estimate using the linear index of the point
Implements npstat::AbsPolyFilterND.
|
virtual |
Contribution of a single point into the density estimate at that point (not normalized). This is needed for various leaving-one-out cross-validation procedures.
Implements npstat::AbsPolyFilterND.
CPP11_auto_ptr<std::vector<Triplet> > npstat::LocalPolyFilterND< MaxDeg >::sparseFilterTriplets | ( | ) | const |
Get the info needed to construct the sparse filter matrix