Nonparametric Quantile Regression: Ichiro Takeuchi Quoc V. Le Tim Sears Alexander J. Smola
Nonparametric Quantile Regression: Ichiro Takeuchi Quoc V. Le Tim Sears Alexander J. Smola
Abstract
In regression, the desired estimate of y|x is not always given by a conditional mean, although this is most
common. Sometimes one wants to obtain a good estimate that satisfies the property that a proportion, τ , of
y|x, will be below the estimate. For τ = 0.5 this is an estimate of the median. What might be called median
regression, is subsumed under the term quantile regression. We present a nonparametric version of a quantile
estimator, which can be obtained by solving a simple quadratic programming problem and provide uniform
convergence statements and bounds on the quantile property of our estimator. Experimental results show the
feasibility of the approach and competitiveness of our method with existing ones. We discuss several types of
extensions including an approach to solve the quantile crossing problems, as well as a method to incorporate
prior qualitative knowledge such as monotonicity constraints.
1. Introduction
Regression estimation is typically concerned with finding a real-valued function f such that its values f (x)
correspond to the conditional mean of y, or closely related quantities. Many methods have been developed
for this purpose, e.g. least mean square (LMS) regression (Vinod (1978)), robust regression (Huber (1981)),
or -insensitive regression (Vapnik (1995); Vapnik et al. (1997)). Regularized variants include Wahba (1990),
penalized by a Reproducing Kernel Hilbert Space (RKHS) norm, and Hoerl and Kennard (1970), regularized
via ridge regression.
1.1 Motivation
While these estimates of the mean serve their purpose, there exists a large area of problems where we are
more interested in estimating a quantile. That is, we might wish to know other features of the the distribution
of the random variable y|x:
• A device manufacturer may wish to know what are the 10% and 90% quantiles for some feature of the
production process, so as to tailor the process to cover 80% of the devices produced.
• For risk management and regulatory reporting purposes, a bank may need to estimate a lower bound
on the changes in the value of its portfolio which will hold with high probability.
2005
c Takeuchi, Le, Sears and Smola.
TAKEUCHI , L E , S EARS AND S MOLA
• A pediatrician requires a growth chart for children given their age and perhaps even medical back-
ground, to help determine whether medical interventions are required, e.g. while monitoring the
progress of a premature infant.
These problems are addressed by a technique called Quantile Regression (QR) championed by Koenker (see
Koenker (2005) for a description, practical guide, and extensive list of references). These methods have been
deployed in econometrics, social sciences, ecology, etc. The purpose of our paper is:
• To bring the technique of quantile regression to the attention of the machine learning community and
show its relation to ν-Support Vector Regression (Schölkopf et al. (2000)).
• To demonstrate a nonparametric version of QR which outperforms the currently available nonlinear
QR regression formations (Koenker (2005)). See Section 5 for details.
• To derive small sample size results for the algorithms. Most statements in the statistical literature for
QR methods are of asymptotic nature Koenker (2005). Empirical process results permit us to define
two quality criteria and show tail bounds for both of them in the finite-sample-size case.
• To extend the technique to permit commonly desired constraints to be incorporated. As examples we
show how to enforce non-crossing constraints and a monotonicity constraint. These constraints allow
us to incorporate prior knowlege on the data.
Definition 1 (Quantile) Denote by y ∈ R a random variable and let τ ∈ (0, 1). Then the τ -quantile of y,
denoted by µτ is given by the infimum over µ for which Pr {y ≤ µ} = τ . Likewise, the conditional quantile
µτ (x) for a pair of random variables (x, y) ∈ X × R is defined as the function µτ : X → R for which
pointwise µτ is the infimum over µ for which Pr {y ≤ µ|x} = τ .
1.3 Examples
To illustrate regression analyses with conditional quantile functions, we provide two simple examples here.
1002
N ONPARAMTERIC Q UANTILE E STIMATION
Figure 1: Illustration of the nonparametric quantile regression on toy dataset. On the left, τ = 0.9. On the
right, τ = 0.5 the quantile regression line approximates the median of the data very closely (since
ξ is normally distributed median and mean are identical).
Here the amount of noise is a function of the location. Since ξ is symmetric with mean and mode 0 we have
µ0.5 (x) = sin πx. Moreover, we can compute the quantiles by solving for Pr {y ≤ µ|x} = τ explicitly.
Since ξ is normal we know that the quantiles of ξ are given by Φ−1 (τ ) sin 2πx, where Φ is the cumulative
distribution function of the normal distribution with unit variance. This means that
µτ (x) = sin πx + Φ−1 (τ ) sin 2πx. (1)
Figure 1 shows two quantile estimates. We see that depending on the choice of the quantile, we obtain a
close approximation of the median (τ = 0.5), or a curve which tracks just inside the upper envelope of the
data (τ = 0.9). The error bars of many regression estimates can be viewed as crude quantile regressions:
one tries to specify the interval within which, with high probability, the data may lie. Note, however, that the
latter does not entirely correspond to a quantile regression: error bars just give an upper bound on the range
within which an estimate lies, whereas QR aims to estimate the exact boundary at which a certain quantile
is achieved. In other words, it corresponds to tight error bars.
1003
TAKEUCHI , L E , S EARS AND S MOLA
Figure 2: An illustration of (a) conditional mean analysis and (b) conditional quantile analysis for a data set
on bone mineral density (BMD) in adolescents. In (a) the conditional mean curve is estimated by
regression spline with least square criterion. In (b) the nine curves are the estimated conditional
quantile curves at orders 0.1, 0.2, . . . , 0.9. The set of conditional quantile curves provides more
informative description of the relationship among variables such as non-constant variance or non-
normality of the noise (error) distribution. In this paper, we are concerned with the problem of
estimating these conditional quantiles.
2. Quantile Regression
Given the definition of qτ (x) and knowledge of support vector machines we might be tempted to use ver-
sion of the -insensitive tube regression to estimate qτ (x). More Specifically one might want to estimate
quantiles nonparametrically using an extension of the ν-trick, as outlined in Schölkopf et al. (2000). How-
ever this approach carries the disadvantage of requiring us to estimate both an upper and lower quantile
simultaneously. While this can be achieved by quadratic programming, in doing so we estimate “too many”
parameters simultaneously. More to the point, if we are interested in finding an upper bound on y which
holds with 0.95 probability we may not want to use information about the 0.05 probability bound in the
estimation. Following Vapnik’s paradigm of estimating only the relevant parameters directly Vapnik (1982)
we attack the problem by estimating each quantile separately. For completeness and comparison, we provide
a detailed description of a symmetric quantile regression in Appendix A.
1004
N ONPARAMTERIC Q UANTILE E STIMATION
(
τξ if ξ ≥ 0
lτ (ξ) = (2)
(τ − 1)ξ if ξ < 0
Lemma 2 (Quantile Estimator) Let Y = {y1 , . . . , ym } ⊂ R and let τ ∈ (0, 1) then the minimizer µτ of
P m
i=1 lτ (yi − µ) with respect to µ satisfies:
Proof Assume that we are at an optimal solution. Then, increasing the minimizer µ by δµ changes the ob-
jective by [(1 − m+ )(1 − τ ) − m+ τ ] δµ. Likewise, decreasing the minimizer µ by δµ changes the objective
by [−m− (1 − τ ) + (1 − m− )τ ] δµ. Requiring that both terms are nonnegative at optimality in conjunction
with the fact that m− + m+ ≤ m proves the first two claims. To see the last claim, simply note that the
event yi = yj for i 6= j has probability measure zero for distributions not containing discrete components.
Taking the limit m → ∞ shows the claim.
The idea is to use the same loss function for functions, f (x), rather than just constants in order to obtain
quantile estimates conditional on x. Koencker Koenker (2005) uses this approach to obtain linear estimates
and certain nonlinear spline models. In the following we will use kernels for the same purpose.
By the same reasoning as in Lemma 2 it follows that for f : X → R the minimizer of R[f ] is the quantile
µτ (x). Since p(x, y) is unknown and we only have X, Y at our disposal we resort to minimizing the
empirical risk plus a regularizer:
m
1 X λ
Rreg [f ] := lτ (yi − f (xi )) + kgk2H where f = g + b and b ∈ R. (4)
m i=1 2
Here k·kH is RKHS norm and we require g ∈ H. Notice that we do not regularize the constant offset, b, in
the optimization problem. This ensures that the minimizer of (4) will satisfy the quantile property:
Lemma 3 (Empirical Conditional Quantile Estimator) Assuming that f contains a scalar unregularized
term, the minimizer of (4) satisfies:
1. The number of terms m− with yi < f (xi ) is bounded from above by τ m.
1005
TAKEUCHI , L E , S EARS AND S MOLA
2. The number of terms m+ with yi > f (xi ) is bounded from above by (1 − τ )m.
3. If (x, y) is drawn iid from a distribution Pr(x, y), with Pr(y|x) continuous and the expectation of
the modulus of absolute continuity of its density satisfying limδ→0 E [(δ)] = 0. With probability 1,
asymptotically, mm− equals τ .
Proof For the two claims, denote by f ∗ the minimum of Rreg [f ] with f ∗ = g ∗ + b∗ . Then Rreg [g ∗ + b] has
to be minimal for b = b∗ . With respect to b, however, minimizing Rreg amounts to finding the τ quantile in
terms of yi − g(xi ). Application of Lemma 2 proves the first two parts of the claim.
For the second part, an analogous reasoning to (Schölkopf et al., 2000, Proposition 1) applies. In a nut-
shell, one uses the fact that the measure of the δ-neighborhood of f (x) converges to 0 for δ → 0. Moreover,
for kernel functions the entropy numbers are well behaved Williamson et al. (2001). The application of the
union bound over a cover of such function classes completes the proof. Details are omitted, as the proof is
identical to that in Schölkopf et al. (2000).
Later, in Section 4 we discuss finite sample size results regarding the convergence of mm− → τ and re-
lated quantities. These statements will make use of scale sensitive loss functions. Before we do that, let us
consider the practical problem of minimizing the regularized risk functional.
Here we used C := 1/(λm). The dual of this problem can be computed straightforwardly using Lagrange
multipliers. The dual constraints for ξ and ξ ∗ can be combined into one variable. This yields the following
dual optimization problem
1 >
minimize α Kα − α> ~y subject to C(τ − 1) ≤ αi ≤ Cτ for all 1 ≤ i ≤ m and ~1> α = 0. (6)
α 2
We recover the f via the familiar kernel expansion
X X
w= αi φ(xi ) or equivalently f (x) = αi k(xi , x) + b. (7)
i i
Note that the constant b is the dual variable to the constraint ~1> α = 0. Alternatively, b can be obtained
by using the fact that f (xi ) = yi for αi 6∈ {C(τ − 1), Cτ }. The latter holds as a consequence of the
KKT-conditions on the primal optimization problem of minimizing Rreg [f ].
Note that the optimization problem is very similar to that of an -SV regression estimator Vapnik et al.
(1997). The key difference between the two estimation problems is that in -SVR we have an additional
kαk1 penalty in the objective function. This ensures that observations with deviations from the estimate,
i.e. with |yi − f (xi )| < do not appear in the support vector expansion. Moreover the upper and lower
1006
N ONPARAMTERIC Q UANTILE E STIMATION
constraints on the Lagrange multipliers αi are matched. This means that we balance excess in both direc-
tions. The latter is useful for a regression estimator. In our case, however, we obtain an estimate which
penalizes loss unevenly, depending on whether f (x) exceeds y or vice versa. This is exactly what we want
from a quantile estimator: by this procedure errors in one direction have a larger influence than those in the
converse direction, which leads to the shifted estimate we expect from QR.
The practical advantage of (6) is that it can be solved directly with standard quadratic programming code
rather than using pivoting, as is needed in SVM regression Vapnik et al. (1997). Figure 3 shows how QR
behaves subject to changing the model class, that is, subject to changing the regularization parameter. All
three estimates in Figure 3 attempt to compute the median subject to different smoothness constraints. While
they all satisfy the quantile property of having a fraction of τ = 0.5 points on either side of the regression,
they track the observations more or less closely. Therefore a practical estimate requires a procedure for
setting the regularization parameter. TThis question is taken up again in Section 5 where we compute
quantile regression estimates on a range of datasets.
1007
TAKEUCHI , L E , S EARS AND S MOLA
of the training data range (x < 0 and 1 < x). In this subsection, we address this problem by introducing
non-crossing constraints. Figure 4(b) shows a family of conditional quantile functions estimated with the
non-crossing constraints.
Suppose that we want to estimate n conditional quantiles at 0 < τ1 < τ2 < . . . < τn < 1. We enforce
non-crossing constraints at l points {xj }lj=1 in the input domain X. Let us write the model for the τh -th
conditional quantile function as fh (x) = hφ(x), wh i + bh for h = 1, 2, . . . , n. In H the non-crossing
constraints are represented as linear constraints
Solving (5) or (6) for 1 ≤ h ≤ n with non-crossing constraints (8) allows us to estimate n conditional
quantile functions not crossing at l points x1 , . . . , xl ∈ X. The primal optimization problem is given by
n h X m
X
∗ 1 i
minimize C τh ξhi + (1 − τh )ξhi + kwh k2 (9a)
(∗)
wh ,bh ,ξhi i=1
2
h=1
∗ ∗
subject to yi − hφ(xi ), wh i − bh = ξhi − ξhi where ξhi , ξhi ≥ 0, for all 1 ≤ h ≤ n, 1 ≤ i ≤ m. (9b)
{hφ(xj ), ωh+1 i + bh+1 } − {hφ(xj ), ωh i + bh } ≥ 0, for all 1 ≤ h ≤ n − 1, 1 ≤ j ≤ l. (9c)
where θhj is the Lagrange multiplier of (9c) for all 1 ≤ h ≤ n, 1 ≤ j ≤ l, K̃ is m × l matrix with its (i, j)-th
entry k(xi , xj ), K̄ is l × l matrix with its (j1 , j2 )-th entry k(xj1 , xj2 ) and θh is l-vector with its j-th entry
θhj for all 1 ≤ h ≤ n. For notational convenience we define θ0j = θnj = 0 for all 1 ≤ j ≤ l. The model
for conditional quantile τh -th quantile function is now represented as
m
X l
X
fh (x) = αhi k(x, xi ) + (θh−1i − θhi )k(x, xj ) + bh . (11)
i=1 j=1
In section 5.2.1 we empirically investigate the effect of non-crossing constraints on the generalization per-
formances.
1008
N ONPARAMTERIC Q UANTILE E STIMATION
Figure 4: An example of quantile crossing problem in BMD data set presented in Section 1. Both of the
input and the output variable are standardized in [0, 1]. In (a) the set of conditional quantiles at
0.1, 0.2, . . . , 0.9 are estimated by the kernel-based estimator presented in the previous section.
Quantile crossings are found at several points, especially at the outside of the training data range
(x < 0 and 1 < x). The plotted curves in (b) are the conditional quantile functions obtained
with non-crossing constraints explained in Section 3.1. There are no quantile crossing even at the
outside of the training data range.
To address this problem we adopt an approach similar to Vapnik et al. (1997); Smola and Schölkopf
(1998) and impose constraints on the derivatives of f directly. While this only ensures that f is mono-
tonic on the observed data X, we could always add more locations x0i for the express purpose of enforcing
monotonicity.
Formally, we require that for a differential operator D, such as D = ∂xage the estimate Df (x) ≥ 0 for
all x ∈ X. Using the linearity of inner products we have
Note that accordingly inner products between ψ and φ can be obtained via hψ(x), φ(x0 )i = D1 k(x, x0 ) and
hψ(x), ψ(x0 )i = D1 D2 k(x, x0 ), where D1 and D2 denote the action of D on the first and second argument
of k respectively. Consequently the optimization problem (5) acquires an additional set of constraints and
we need to solve
m
X 1
minimize C τ ξi + (1 − τ )ξi∗ + kwk2 (13)
w,b,ξi
i=1
2
subject to yi − hφ(xi ), wi − b ≤ ξi , hφ(xi ), wi + b − yi ≤ ξi∗ and hψ(xi ), wi ≥ 0 where ξi , ξi∗ ≥ 0.
1009
TAKEUCHI , L E , S EARS AND S MOLA
Figure 5: Example plots from quantile regression with and without monotonicity constraints. The thin line
represents the nonparametric quantile regression without monotonicity constraints whereas the
thick line represents the nonparamtric quantile regression with monotonicity constraints.
Since the additional constraint does not depend on b it is easy to see that the quantile property still holds.
The dual optimization problem yields
>
1 α K D1 K α
minimize − α> ~y (14a)
α,β 2 β D2 K D1 D2 K β
subject to C(τ − 1) ≤ αi ≤ Cτ and 0 ≤ βi for all 1 ≤ i ≤ m and ~1> α = 0. (14b)
Here D1 KP
is a shorthand for the matrix of entries D1 k(xi ,P
xj ) and D2 K, D1 D2 K are defined analogously.
Here w = i αi φ(xi ) + βi ψ(xi ) or equivalently f (x) = i αi k(xi , x) + βi D1 k(xi , x) + b.
Example Assume that x ∈ Rn and that x1 is the coordinate with respect to which we wish to enforce
monotonicity. Moreover, assume that we use a Gaussian RBF kernel, that is
1 2
k(x, x0 ) = exp − 2 kx − x0 k . (15)
2σ
1010
N ONPARAMTERIC Q UANTILE E STIMATION
x01 − x1 x1 − x01
D1 k(x, x0 ) = 2
k(x, x0
); D 2 k(x, x0
) = k(x, x0 ) (16a)
" σ # σ2
2
(x1 − x01 )
D1 D2 k(x, x0 ) = σ −2 − k(x, x0 ). (16b)
σ4
Plugging the values of (16) into (14) yields the quadratic program. Note also that both k(x, x0 ) and D1 k(x, x0 )
((16a)), are used in the function expansion.
If x1 were drawn from a discrete (yet ordered) domain we could replace D1 , D2 with a finite difference
operator. This is still a linear operation on k and consequently the optimization problem remains unchanged
besides a different functional form for D1 k.
For instance, the function class fi could be linear coordinate functions, that is, fi (x) = xi . The main
difference to (6) is that the resulting optimization problem exhibits a larger number of equality constraint.
We obtain (6) with the additional constraints
m
X
αj fi (xj ) = 0 for all i. (18)
j=1
Linear Programming Regularization Convex function classes with `1 penalties can be obtained by im-
2
posing an kαk1 penalty instead of the kgkH penalty in the optimization problem. The advantage of this
setting is that minimizing
m n n
1 X X X
minimize lτ (yi − f (xi )) + λ |αi | where f (x) = αi fi (x) + b. (19)
m i=1 j=1 i=1
is a linear program which can be solved efficiently by existing codes for large scale problems. In the context
of (19) the functions fi constitute the generators of the convex function class. This approach is similar to
Koenker and Park (1996) and Bosch et al. (1995). The former discuss `1 regularization of expansion coeffi-
cients whereas the latter discuss an explicit second order smoothing spline method for the purpose of quantile
regression. Most of the discussion in the present paper can be adapted to this case without much modifica-
tion. For details on how to achieve this see Schölkopf and Smola (2002). Note that smoothing splines are a
special instance of kernel expansions where one assumes explicit knowledge of the basis functions.
1011
TAKEUCHI , L E , S EARS AND S MOLA
Relevance Vector Regularization and Sparse Coding Finally, for sparse expansions one can use more
aggressive penalties on linear function expansions than those given in (19). For instance, we could use
a staged regularization as in the RVM (Tipping (2001)), where a quadratic penalty on each coefficient is
exerted with a secondary regularization on the penalty itself. This corresponds to a Student-t penalty on α.
Likewise we could use a mix between an `1 and `0 regularizer as used in Fung et al. (2002) and apply
successive linear approximation. In short, there exists a large number of regularizers, and (non)parametric
families which can be used. In this sense the RKHS parameterization is but one possible choice. Even so,
we show in Section 5 that QR using the RKHS penalty yields excellent performance in experiments.
4. Theoretical Analysis
4.1 Performance Indicators
In this section we state some performance bounds for our estimator. For this purpose we first need to discuss
how to evaluate the performance of the estimate f versus the true conditional quantile µτ (x). Two criteria
are important for a good quantile estimator fτ :
• fτ needs to satisfy the quantile property as well as possible. That is, we want that
Pr {| Pr {y < fτ (x)} − τ | ≥ } ≤ δ. (20)
X,Y
In other words, we want that the probability that y < fτ (x) does not deviate from τ by more than
with high probability, when viewed over all draws (X, Y ) of training data. Note however, that (20)
does not imply having a conditional quantile estimator at all. For instance, the constant function based
on the unconditional quantile estimator with respect to Y performs extremely well under this criterion.
Hence we need a second quantity to assess how closely fτ (x) tracks µτ (x).
• Since µτ itself is not available, we take recourse to (3) and the fact that µτ is the minimizer of the
expected risk R[f ]. While this will not allow us to compare µτ and fτ directly, we can at least compare
it by assessing how close to the minimum R[fτ∗ ] the estimate R[fτ ] is. Here fτ∗ is the minimizer of
R[f ] with respect to the chosen function class. Hence we will strive to bound
Pr {R[fτ ] − R[fτ∗ ] > } ≤ δ. (21)
X,Y
These statements will be given in terms of the Rademacher complexity of the function class of the estimator
as well as some properties of the loss function used in select it. The technique itself is standard and we believe
that the bounds can be tightened considerably by the use of localized Rademacher averages Mendelson
(2003), or similar tools for empirical processes. However, for the sake of simplicity, we use the tools from
Bartlett and Mendelson (2002), as the key point of the derivation is to describe a new setting rather than a
new technique.
1012
N ONPARAMTERIC Q UANTILE E STIMATION
Conveniently, if Φ is a Lipschitz continuous function with Lipschitz constant L, one can show Bartlett and
Mendelson (2002) that
An analogous result exists for empirical quantities bounding R̂m (Φ ◦ F) ≤ 2LR̂m (F). The combination of
(23) with (Bartlett and Mendelson, 2002, Theorem 8) yields:
Theorem 5 (Concentration for Lipschitz Continuous Functions) For any Lipschitz continuous function
Φ with Lipschitz constant L and a function class F of real-valued functions on X and probability measure
on X the following bound holds with probability 1 − δ for all draws of X from X:
m
r
1 X 8 log 2/δ
sup Ex [Φ(f (x))] − Φ(f (xi )) ≤ 2LRm (F) + . (24)
f ∈F m i=1
m
We can immediately specialize the theorem to the following statement about the loss for QR:
Theorem 6 Denote by fτ∗ the minimizer of the R[f ] with respect to f ∈ F. Moreover assume that all f ∈ F
are uniformly bounded by some constant B. With the conditions listed above for any sample size m and
0 < δ < 1, every quantile regression estimate fτ satisfies with probability at least (1 − δ)
r
∗ log 2/δ
R[fτ ] − R[fτ ] ≤ 2 max LRm (F) + (4 + LB) where L = {τ, 1 − τ } . (25)
2m
Proof We use the standard bounding trick that
where (26) follows from Remp [fτ ] ≤ Remp [fτ∗ ]. The first term can be bounded directly by Theorem 5.
For the second part we use Hoeffding’s bound Hoeffding (1963)
q which states that the deviation between a
bounded random variable and its expectation is bounded by B log2m 1/δ
with probability δ. Applying a union
bound argument for the two terms with probabilities 2δ/3 and δ/3 yields the confidence-dependent term.
Finally, using the fact that lτ is Lipschitz continuous with L = max(τ, 1 − τ ) completes the proof.
Example Assume that H is an RKHS with radial basis function kernel k for which k(x, x) = 1. Moreover
assume that for all f ∈ F we have kf kH ≤ C. In this case it follows from Mendelson (2003) that Rm (F) ≤
2C
√
m
. This means that the bounds of Theorem 6 translate into a rate of convergence of
1
R [fτ ] − R [fτ∗ ] = O(m− 2 ). (28)
This is as good as it gets for nonlocalized estimates. Since we do not expect R[f ] to vanish except for patho-
logical applications where quantile regression is inappropriate (that is, cases where we have a deterministic
dependency between y and x), the use of localized estimates Bartlett et al. (2002) provides only limited re-
turns. We believe, however, that the constants in the bounds could benefit from considerable improvement.
1013
TAKEUCHI , L E , S EARS AND S MOLA
Figure 6: Ramp functions bracketing bracketing the characteristic function via r+ ≥ χ(−∞,0] ≥ r− .
Theorem 7 Under the assumptions of Theorem 6 the expected quantile is bounded with probability 1 − δ
each from above and below by
m m
1 X − 1 X +
r (yi − f (xi )) − ∆ ≤ E χ(−∞,0] (y − fτ (x)) ≤ r (yi − f (xi )) + ∆, (30)
m i=1 m i=1
q
−8 log δ
where the statistical confidence term is given by ∆ = 2 Rm (F) + m .
Proof The claim follows directly from Theorem 5 and the Lipschitz continuity of r+ and r− . Note that r+
and r− minorize and majorize ξ(−∞,0] , which bounds the expectations. Next use a Rademacher bound on
the class of loss functions induced by r+ ◦ F and r− ◦ F and note that the ramp loss has Lipschitz constant
L = 1/. Finally apply the union bound on upper and lower deviations.
Note that Theorem 7 allows for some flexibility: we can decide to use a very conservative bound in terms of
, i.e. a large value of to reap the benefits of having a ramp function with small L. This leads to a lower
bound on the Rademacher average of the induced function class. Likewise, a small amounts to a potentially
tight approximation of the empirical quantile, while risking loose statistical confidence terms.
5. Experiments
5.1 Experiments with standard nonparametric quantile regression
The present section mirrors the theoretical analysis of the previous section. We check the performance of
various quantile estimators with respect to two criteria:
• Expected risk with respect to the `τ loss function. Since computing the true conditional quantile is
impossible and all approximations of the latter rely on intermediate density estimation Koenker (2005)
this is the only objective criterion we could find.
1014
N ONPARAMTERIC Q UANTILE E STIMATION
• Simultaneously we need to ensure that the estimate satisfies the quantile property, that is, we want
to ensure that the estimator we obtained does indeed produce numbers fτ (x) which exceed y with
probability close to τ .
5.1.1 M ODELS
We compare the following four models:
• An unconditional quantile estimator. Given the simplicity of the function class (constants!) this model
should tend to underperform all other estimates in terms of minimizing the empirical risk. By the same
token, it should perform best in terms of preserving the quantile property.
• Linear QR as described in Koenker (2005). This uses the a linear unregularized model to minimize lτ .
In experiments, we used the rq routine available in the R2 package called quantreg.
• Nonparametric QR as described by Koenker (2005) (Ch. 7). This uses a spline model for each coordi-
nate individually, with linear effect. The fitting routine used was rqss, also available in quantreg.3
• Nonparametric quantile regression as described in Section 2. We used Gaussian RBF kernels with au-
tomatic kernel width (ω 2 ) and regularization (C) adjustment by 10-fold cross-validation. This appears
as nprq.4
As we increase the complexity of the function class (from constant to linear to nonparametric) we expect
that (subject to good capacity control) the expected risk will decrease. Simultaneously we expect that the
quantile property becomes less and less maintained, as the function class grows. This is exactly what one
would expect from Theorems 6 and 7. As the experiments show, the npqr method outperforms all other
estimators significantly in most cases. Moreover, it compares favorably in terms of preserving the quantile
property.
5.1.2 DATASETS
We chose 20 regression datasets from the following R packages: mlbench, quantreg, alr3 and
MASS. The first library contains datasets from the UCI repository. The last two were made available as
illustrations for regression textbooks. The data sets are all documented and available in R. Data sets were
chosen not to have any missing variables, to have suitable datatypes, and to be of a size where all models
would run on them. 5 In most cases either there was an obvious variable of interest, which was selected
as the y-variable, or else we chose a continuous variable arbitrarily. The sample sizes vary from m = 38
(CobarOre) to m = 1375 (heights), and the number of regressors vary from d = 1 (5 sets) and d =
12 (BostonHousing). Some of the data sets contain categorical variables. We omitted variables which
were effectively record identifiers, or obviously produced very small groupings of records. Finally, we
standardized all datasets coordinatwise to have zero mean and unit variance before running the algorithms.
This had a side benefit of putting the pinball loss on similar scale for comparison purposes.
2. See http://cran.r-project.org/
3. Additional code containing bugfixes and other operations necessary to carry out our experiments is available at
http://users.rsise.anu.edu.au/∼timsears.
4. Code will be available as part of the CREST toolbox for research purposes.
5. The last requirement, using rqss proved to be challenging. The underlying spline routines do not allow extrapolation beyond
the previously seen range of a coordinate, only permitting interpolation. This does not prevent fitting, but does randomly prevent
forecasting on unseen examples, which was part of our performance metric.
1015
TAKEUCHI , L E , S EARS AND S MOLA
Data Set Sample Size No. Regressors (x) Y Var. Dropped Vars.
caution 100 2 y -
ftcollinssnow 93 1 Late YR1
highway 39 11 Rate -
heights 1375 1 Dheight -
sniffer 125 4 Y -
snowgeese 45 4 photo -
ufc 372 4 Height -
birthwt 189 7 bwt ftv, low
crabs 200 6 CW index
GAGurine 314 1 GAG -
geyser 299 1 waiting -
gilgais 365 8 e80 -
topo 52 2 z -
BostonHousing 506 13 medv -
CobarOre 38 2 z -
engel 235 1 y -
mcycle 133 1 accel -
BigMac2003 69 9 BigMac City
UN3 125 6 Purban Locality
cpus 209 7 estperf name
1016
N ONPARAMTERIC Q UANTILE E STIMATION
5.1.3 R ESULTS
We tested the performance of the 4 algorithms on 3 different quantiles (τ ∈ {0.1, 0.5, 0.9}). For each model
we used 10-fold cross-validation to assess the confidence of our results. For the npqr model, kernel width
and smoothness parameters were automatically chosen by cross-validation within the training sample. We
performed 10 runs on the training set to adjust parameters, then chose the best parameter setting based on
the pinball loss averaged over 10 splits. To compare across all four models we measured both pinball loss
and quantile performance.
The full results are shown in Appendix B. The 20 data sets and three quantile levels yield 60 trials for
each model. In terms of pinball loss averaged across 10 tests the npqr model performed best or tied on
51 of the 60 trials, showing the clear advantage of the proposed method. The results are consistent across
quantile levels. We can get another impression of performance by looking at the loss in each of the 10 test
runs that enter each trial. This is depicted in Figure 5.1.3. In a large majority of test cases the npqr model
error is smaller than that of the other models, resulting in a “cloud” centered below the 45 degree line.
Moreover, the quantile properties of all four methods are comparable. All four models produced ramp
losses close to the desired quantile, although the rqss and npqr models were noisier in this regard. The
complete results for the ramp loss are presented in last three tables in Appendix B. A slight downward bias
seen in all models is reviewed in the Discussion.
1017
TAKEUCHI , L E , S EARS AND S MOLA
Figure 7: A log-log plot of out-of-sample performance obtained from the cross validation runs. The plots
show npqr versus uncond, linear, and rqss; combining the values from all three estimated quantiles.
Each point below the 45-degree line represents a case where the npqr achieves a better loss that
the alternative and vice versa. The location of the cloud provides an impression of the relative
generalization performance of each pair of models.
1018
N ONPARAMTERIC Q UANTILE E STIMATION
• The onions dataset as described in Ruppert and Carroll (2003). log(Yield) is studied as a function of
density, we use only the measurements taken at Purnong Landing.
We tested the performance of the two methods on 3 different quantiles (τ ∈ {0.1, 0.5, 0.9}). In the exper-
iments with cars, we noticed that the data is not truly monotonic. Monotonic models (npqrm) tend to do
worse than standard models (npqr) for lower quantiles. With higher quantiles, npqrm tends to do better
than the standard npqr.
For the onions dataset, as the data is truly monotonic the npqrm does better than the standard npqr
in terms of the pinball loss.
1019
TAKEUCHI , L E , S EARS AND S MOLA
Figure 8: Illustration of the relationship between quantile in training and ramp loss.
Estimation with constraints We introduce non-crossing and monotonicity constraints in the context of
nonparametric quantile regression. However, as discussed in Mammen et al. (2001), other constraints can
also be applied very similiarly to the constraints described in this paper but might be in different estimation
contexts. Here are some variations:
• Boundary conditions. The regression function is defined in [a, b] and assumed to be v at the boundary
point a or b.
• Additive models with monotone components. The regression function f : Rn → R is of additive form
f (x1 , ..., xn ) = f1 (x1 ) + ... + fn (xn ) where each additive component fi is monotonic.
• Observed deriatives. Assume that m samples are observed corresponding with m regression functions.
Now, the constraint is that fj coincides with the derivative of fj−1 (same notation with last point) Cox
(1988).
• Bivariate extreme-value distributions. See Hall and Tajvidi (2000).
• Positivity constraints. The regression function is positive.
Future Work Quantile regression has been mainly used as a data analysis tool to assess the influence
of individual variables. This is an area where we expect that nonparametric estimates will lead to better
performance.
Being able to estimate an upper bound on a random variable y|x which hold with probability τ is useful
when it comes to determining the so-called Value at Risk of a portfolio. Note, however, that in this situation
we want to be able to estimate the regression quantile for a large set of different portfolios. For example,
an investor may try to optimize their portfolio allocation to maximize return while keeping risk within a
constant bound. Such uniform statements will need further analysis if we are to perform nonparametric
estimates. We need more efficient optimization algorithm for non-crossing constraints since we have to
work with O(nm) dual variables. Simple SVM Vishwanathan et al. (2003) would be the promising candidate
for this purpose.
1020
N ONPARAMTERIC Q UANTILE E STIMATION
Acknowledgments National ICT Australia is funded through the Australian Government’s Backing Aus-
tralia’s Ability initiative, in part through the Australian Research Council. This work was supported by
grants of the ARC, by the Pascal Network of Excellence and by Japanese Grants-in-Aid for Scientific Re-
search 16700258. We thank Roger Koenker for providing us with the latest version of the R package
quantreg, and for technical advice. We thank Shahar Mendelson and Bob Williamson for useful discus-
sions and suggestions.
References
L.K. Bachrach, T. Hastie, M.C. Wang, B. Narashimhan, and R. Marcus. Bone mineral acquisition in
healthy asian, hispanic, black and caucasian youth, a longitudinal study. Journal of Clinical Endocrinal
Metabolism, 84:4702– 4712, 1999.
P.L. Bartlett, O. Bousquet, and S. Mendelson. Localized rademacher averages. In Proceedings of the 15th
conference on Computational Learning Theory COLT’02, pages 44–58, 2002.
P.L. Bartlett and S. Mendelson. Rademacher and gaussian complexities: Risk bounds and structural results.
Journal of Machine Learning Research, 3:463–482, 2002.
P. J. Bickel, C. A. J. Klaassen, Y. Ritov, and J. A. Wellner. Efficient and adaptive estimation for semipara-
metric models. J. Hopkins Press, Baltimore, ML, 1994.
R.J. Bosch, Y.Ye, and G.G.Woodworth. A convergent algorithm for quantile regression with smoothing
splines. Computational Statistics and Data Analysis, 19:613–630, 1995.
D.D. Cox. Approximation of method of regularization estimators. Annals of Statistics, 1988.
G. Fung, O. L. Mangasarian, and A. J. Smola. Minimal kernel classifiers. Journal of Machine Learning
Research, 3:303–321, 2002.
C. Gu and G. Wahba. Semiparametric analysis of variance with tensor product thin plate splines. Journal of
the Royal Statistical Society B, 55:353–368, 1993.
P. Hall and N. Tajvidi. Distribution and dependence-function estimation for bivariate extreme-value distri-
butions. Bernoulli, 2000.
T. Hastie, R. Tibshirani, and J. Friedman. The Elements of Statistical Learning. Springer, New York, 2001.
X. He. Quantile curves without crossing. The American Statistician, 51(2):186–192, may 1997. URL
http://www.amstat.org/publications/tas/abstracts/he.html.
W. Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American
Statistical Association, 58:13–30, 1963.
A. E. Hoerl and R. W. Kennard. Ridge regression: biased estimation for nonorthogonal problems. Techno-
metrics, 12:55–67, 1970.
P. J. Huber. Robust Statistics. John Wiley and Sons, New York, 1981.
R. Koenker. Quantile Regression. Cambridge University Press, 2005.
1021
TAKEUCHI , L E , S EARS AND S MOLA
R. Koenker and B.J. Park. An interior point algorithm for nonlinear quantile regression. Journal of Econo-
metrics, 71:265–283, 1996.
E. Mammen, J.S. Marron, B.A. Turlach, and M.P. Wand. A general projection framework for constrained
smoothing. Statistical Science, 16(3):232–248, August 2001.
S. Mendelson. A few notes on statistical learning theory. In S. Mendelson and A. J. Smola, editors, Advanced
Lectures on Machine Learning, number 2600 in LNAI, pages 1–40. Springer, 2003.
D. Ruppert and R.J. Carroll. Semiparametric Regression. Wiley, 2003.
B. Schölkopf and A. Smola. Learning with Kernels. MIT Press, Cambridge, MA, 2002.
B. Schölkopf, A. J. Smola, R. C. Williamson, and P. L. Bartlett. New support vector algorithms. Neural
Computation, 12:1207–1245, 2000.
B. Schölkopf, R. C. Williamson, A. J. Smola, and J. Shawe-Taylor. Single-class support vector machines.
In J. Buhmann, W. Maass, H. Ritter, and N. Tishby, editors, Unsupervised Learning, Dagstuhl-Seminar-
Report 235, pages 19–20, 1999.
A. J. Smola, T. Frieß, and B. Schölkopf. Semiparametric support vector and linear programming machines.
In M. S. Kearns, S. A. Solla, and D. A. Cohn, editors, Advances in Neural Information Processing Systems
11, pages 585–591, Cambridge, MA, 1999. MIT Press.
A. J. Smola and B. Schölkopf. On a kernel-based method for pattern recognition, regression, approximation
and operator inversion. Algorithmica, 22:211–231, 1998.
M. Tipping. Sparse Bayesian learning and the relevance vector machine. Journal of Machine Learning
Research, 1:211–244, 2001.
V. Vapnik. The Nature of Statistical Learning Theory. Springer, New York, 1995.
V. Vapnik, S. Golowich, and A. J. Smola. Support vector method for function approximation, regression
estimation, and signal processing. In M. C. Mozer, M. I. Jordan, and T. Petsche, editors, Advances in
Neural Information Processing Systems 9, pages 281–287, Cambridge, MA, 1997. MIT Press.
V. N. Vapnik. Estimation of Dependences Based on Empirical Data. Springer, Berlin, 1982.
H. D. Vinod. A survey of ridge regression and related techniques for improvements over ordinary least
squares. Review of Economics and Statistics, 60:121–131, February 1978.
S. V. N. Vishwanathan, A. J. Smola, and M.N. Murty. SimpleSVM. In
Proc. of the International Conference on Machine Learning (ICML), 2003. URL
http://users.rsise.anu.edu.au/ vishy/papers/VisSmoMur03.pdf.
G. Wahba. Spline Models for Observational Data, volume 59 of CBMS-NSF Regional Conference Series in
Applied Mathematics. SIAM, Philadelphia, 1990.
R. C. Williamson, A. J. Smola, and B. Schölkopf. Generalization bounds for regularization networks and
support vector machines via entropy numbers of compact operators. IEEE Transaction on Information
Theory, 47(6):2516–2532, 2001.
1022
N ONPARAMTERIC Q UANTILE E STIMATION
Here K1 , K2 are kernel matrices where [Ki ]jl = ki (xj , xl ) and ~1 denotes the vector of ones. Moreover, we
have the usual kernel expansion, this time for the regression f (x) and the margin (x) via
m
X m
X
f (x) = (αi − αi∗ ) k1 (xi , x) + b and (x) = (αi + αi∗ ) k2 (xi , x) + . (33)
i=1 i=1
The scalars b and can be computed conveniently as dual variables of (32) when solving the problem with
an interior point code.
1023
TAKEUCHI , L E , S EARS AND S MOLA
A.3 An Example
The above derivation begs the question why one should not use (32) instead of (6) for the purpose of quantile
regression. After all, both estimators yield an estimate for the upper and lower quantiles.
Firstly, the combined approach is numerically more costly as it requires optimization over twice the
number of parameters, albeit at the distinct advantage of a sparse solution, whereas (6) always leads to a
dense solution.
The key difference, however, is that (32) is prone to producing estimates where the margin (x) < 0.
While such a solution is clearly unreasonable, it occurs whenever the margin is rather small and the overall
tradeoff of simple f vs. simple yields an advantage by keeping f simple. With enough data this effect
vanishes, however, it occurs quite frequently, even with supposedly distant quantiles, as can be seen in
Figure 9.
In addition, the latter suffers from the assumption that the error be symmetrically distributed. In other
words, if we are just interested in obtaining the 0.95 quantile estimate we end up estimating the 0.05 quantile
on the way. In addition to that, we make the assumption that the additive noise is symmetric.
We produced this derivation and experiments mainly to make the point that the adaptive margin approach
of Schölkopf et al. (2000) is insufficient to address the problems posed by quantile regression. We found
empirically that it is much easier to adjust QR instead of the symmetric variant.
In summary, the symmetric approach is probably useful only for parametric estimates where the number
of parameters is small and where the expansion coefficients ensure that (x) ≥ 0 for all x.
1024
N ONPARAMTERIC Q UANTILE E STIMATION
Figure 9: Illustration of the heteroscedastic SVM regression on toy dataset. On the left, λ1 = 1, λ2 = 10
and ν = 0.2, the algorithm successfully regresses the data. On the right, λ1 = 1, λ2 = 0.1 and
ν = 0.2, the algorithm fails to regress the data as becomes negative.
in each case. NA denotes cases where rqss Koenker (2005) was unable to produce estimates, due to its
construction of the function system.
In the next three tables we measure the ramp loss. In each table a figure close the the intended quantile
(10, 50 or 90) is preferred. For further discussion see the Results section of the paper.
1025
TAKEUCHI , L E , S EARS AND S MOLA
1026
N ONPARAMTERIC Q UANTILE E STIMATION
1027
TAKEUCHI , L E , S EARS AND S MOLA
1028
N ONPARAMTERIC Q UANTILE E STIMATION
1029
TAKEUCHI , L E , S EARS AND S MOLA
1030
N ONPARAMTERIC Q UANTILE E STIMATION
1031
TAKEUCHI , L E , S EARS AND S MOLA
Table 8: Comparison between the quantile regression without (npqr) and with (npqrm) monotonicity con-
straints. We tested on the cars and the onions dataset for monotonicity with respect to engine
size and diameter respectively. Note that on the engines dataset the monotonicity constraint is not
perfectly satisfied, as is manifest in the somewhat worse performance of npqrm, whereas for the
onions yield estimation performance is improved when imposing monotonicity constraints.
1032