npstat::QuantileRegression1D< Pair, Wnum > Class Template Reference
Detailed Descriptiontemplate<typename Pair, typename Wnum = double>
|
npstat::QuantileRegression1D< Pair, Wnum >::QuantileRegression1D | ( | const Pair * | points, |
const Wnum * | weights, | ||
unsigned long | nPoints, | ||
double | location, | ||
double | scale, | ||
double | quantile, | ||
unsigned | polyDegree, | ||
bool | useGegenbauerPolys, | ||
double | gegenbauerLambda | ||
) |
Constructor arguments are as follows:
points – The data to regress. Predictor is the first member of the pair and response is the second.
weights – Localizing weights. Can be NULL in which case it is assumed that each weight is 1.0 (this is appropriate for global regression).
nPoints – Number of elements in the "points" array and, if provided, in the "weights" array as well.
location – Can be used to shift all points.
scale – Can be used to scale distances between all points. The coordinates at which the regression polynomials will be evaluated will be transformed according to x_poly = (points[i].first - location)/scale.
quantile – The target quantile.
polyDegree – Maximum polynomial degree in the fit.
useGegenbauerPolys – Set to "true" to use Gegenbauer polynomials (appropriate for local fit), and to "false" to use Legendre polynomials (appropriate for global regression).
gegenbauerLambda – set this to 0.5 + "power" parameter of the SymmetricBeta1D if you are using Gegenbauer polynomials for regression. This parameter is ignored in case Legendre polynomials are used.
This class will not make an internal copy and will not own the provided data and weights.
double npstat::QuantileRegression1D< Pair, Wnum >::operator() | ( | const Numeric2 * | coeffs, |
unsigned | lenCoeffs | ||
) | const |
This operator takes the polynomial coefficients and their number as arguments (the number of the coefficients must be equal to polyDegree + 1). 0th degree coefficient comes first.