Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3...

19
Biometrika (2014), xx, x, pp. 1–15 C 2007 Biometrika Trust Printed in Great Britain Classification with Confidence BY J ING LEI Department of Statistics, Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh, Pennsylvania, 15215, U.S.A [email protected] 5 SUMMARY A framework of classification is developed with a notion of confidence. In this framework, a classifier consists of two tolerance regions in the predictor space with a specified coverage level for each class. The classifier also produces an ambiguous region where the classification needs further investigation. Theoretical analysis reveals interesting structures of the confidence- 10 ambiguity trade-off, and characterizes the optimal solution by extending the Neyman–Pearson lemma. We provide general estimating procedures, with rates of convergence, based on estimates of the conditional probabilities. The method can be easily implemented with good robustness, as illustrated through theory, simulation and a data example. Some key words: Classification; Confidence level; Consistency; Neyman–Pearson lemma; Level set 15 1. I NTRODUCTION In the binary classification problem, the data consist of independent pairs of random vari- ables (Y i ,X i ) 2 {0, 1} X (i =1, ..., n) from a common distribution P , where X is usually a subset of R d . The classical inference task is to find a mapping f : X 7! {0, 1} with small mis- classification probability pr{f (X ) 6= Y }. The misclassification probability is minimized by the 20 Bayes classifier f Bayes (x)=1 I{(x) 1/2}, where (x) = pr(Y =1 | X = x) and 1 I(·) is the indicator function. While the misclassification probability serves as a good assessment of the overall performance, it does not directly provide confidence for a classification decision on each observation, and classification results near the boundary can be much worse than elsewhere. In this work we develop a new framework of classification with the notion of confidence and 25 efficiency. Let P j be the conditional distribution of X given Y = j , for j =0, 1. Given 0 , 1 2 (0, 1), we look for classification regions C 0 and C 1 such that X = C 0 [ C 1 , and P j (C j ) 1 - j ,(j =0, 1). Here j , chosen by the user, is the tolerated noncoverage rate for class j . Now C 0 and C 1 may overlap and give an ambiguous region C 01 C 0 \ C 1 . The sets C 0 and C 1 define a set-valued classifier 30 h(x)= 8 > < > : {1}, x 2 C 1 \C 01 , {0}, x 2 C 0 \C 01 , {0, 1}, x 2 C 01 . (1) We measure the efficiency of h by pr(X 2 C 01 ), which is called the ambiguity of h. A good classifier can be found by solving the optimization problem minimize pr(X 2 C 0 \ C 1 ) subject to C 0 [ C 1 = X , P j (C j ) 1 - j ,j =0, 1. (2)

Transcript of Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3...

Page 1: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Biometrika (2014), xx, x, pp. 1–15C� 2007 Biometrika TrustPrinted in Great Britain

Classification with Confidence

BY JING LEI

Department of Statistics, Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh,Pennsylvania, 15215, U.S.A

[email protected] 5

SUMMARY

A framework of classification is developed with a notion of confidence. In this framework,a classifier consists of two tolerance regions in the predictor space with a specified coveragelevel for each class. The classifier also produces an ambiguous region where the classificationneeds further investigation. Theoretical analysis reveals interesting structures of the confidence- 10

ambiguity trade-off, and characterizes the optimal solution by extending the Neyman–Pearsonlemma. We provide general estimating procedures, with rates of convergence, based on estimatesof the conditional probabilities. The method can be easily implemented with good robustness, asillustrated through theory, simulation and a data example.

Some key words: Classification; Confidence level; Consistency; Neyman–Pearson lemma; Level set 15

1. INTRODUCTION

In the binary classification problem, the data consist of independent pairs of random vari-ables (Y

i

, X

i

) 2 {0, 1}⇥ X (i = 1, ..., n) from a common distribution P , where X is usually asubset of Rd. The classical inference task is to find a mapping f : X 7! {0, 1} with small mis-classification probability pr{f(X) 6= Y }. The misclassification probability is minimized by the 20

Bayes classifier fBayes(x) = 1I{⌘(x) � 1/2}, where ⌘(x) = pr(Y = 1 | X = x) and 1I(·) is theindicator function. While the misclassification probability serves as a good assessment of theoverall performance, it does not directly provide confidence for a classification decision on eachobservation, and classification results near the boundary can be much worse than elsewhere.

In this work we develop a new framework of classification with the notion of confidence and 25

efficiency. Let Pj

be the conditional distribution of X given Y = j, for j = 0, 1. Given ↵0,↵1 2(0, 1), we look for classification regions C0 and C1 such that X = C0 [ C1, and P

j

(C

j

) � 1�↵

j

, (j = 0, 1). Here ↵j

, chosen by the user, is the tolerated noncoverage rate for class j. Now C0

and C1 may overlap and give an ambiguous region C01 ⌘ C0 \ C1. The sets C0 and C1 define aset-valued classifier 30

h(x) =

8

>

<

>

:

{1}, x 2 C1\C01,

{0}, x 2 C0\C01,

{0, 1}, x 2 C01.

(1)

We measure the efficiency of h by pr(X 2 C01), which is called the ambiguity of h. A goodclassifier can be found by solving the optimization problem

minimize pr(X 2 C0 \ C1)

subject to C0 [ C1 = X , P

j

(C

j

) � 1� ↵

j

, j = 0, 1.

(2)

Page 2: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

2 J. LEI

The quality of a classifier is measured by the coverage and ambiguity. There is a trade-off be-tween these two competing quantities.

The proposed framework allows customized error control for both classes, which can be use-35

ful in many applications, especially when the cost of misclassification is high in one class orboth. For example, in medical screening, a misclassification may result in missed medical careor a waste of resources (Hanczar & Dougherty, 2008; Nadeem et al., 2010). In gene expressionstudies for biomarker identification, it is important to control the level of false negatives, whichis hard to achieve using conventional methods because true biomarkers are rare. Definitive clas-40

sifiers, such as Neyman–Pearson classification (Scott & Nowak, 2005; Han et al., 2008; Rigollet& Tong, 2011; Tong, 2013), usually cannot guarantee accuracy for both classes.

Set-valued classifiers with an associated level of confidence were considered by Shafer &Vovk (2008) and Vovk et al. (2009). The relationship between several notions of confidence isdiscussed in Vovk (2013) and Lei & Wasserman (2014). The novel parts of our framework in-45

clude the notion of ambiguity as a measure of statistical efficiency, formulating the problem byminimizing ambiguity with a confidence guarantee, and deriving optimal solutions and estima-tion methods.

Another related topic is classification with a reject option, where the classifier may not outputa definitive classification. Chow (1970) considered this under a decision-theoretic framework.50

Herbei & Wegkamp (2006) and Yuan & Wegkamp (2010) studied plug-in methods and empiricalrisk minimization. In our framework, the ambiguous region corresponds to the cases where theclassifier does not give definitive output. Despite this similarity, classification with reject optionstill aims at minimizing an overall misclassification risk, while our framework allows the user tocustomize the desired level of confidence for each class.55

2. THE FRAMEWORK

2·1. Class-specific coverageAssume that P

j

, the distribution of X given Y = j, is continuous with density function p

j

forj = 0, 1. Let ⇡

j

= pr(Y = j), (j = 0, 1). Then

⌘(x) = pr(Y = 1 | X = x) =

⇡1p1(x)

⇡0p0(x) + ⇡1p1(x).

We assume that ⌘(X) is a continuous random variable, and that ⇡0, ⇡1 are positive constants.See Remark 2 for the case that ⌘(X) is not continuous. For any C0, C1, the ambiguity is

P (C0 \ C1) =⇡0P0(C01) + ⇡1P1(C01) ⇡0P0(C1) + ⇡1P1(C0).60

According to the Neyman–Pearson lemma, the set C0 that minimizes P1(C0) subject toP0(C

c

0) ↵0 is a level set of ⌘, and a similar result holds for C1, where C

c

0 denotes the comple-ment of C0. The following theorem says that C0 and C1 constructed from the level sets of ⌘ areindeed optimal for problem (2). It can be viewed as an extension of the Neyman–Pearson lemma.

THEOREM 1. Fix 0 < ↵0,↵1 < 1. A solution to the optimization problem (2) is

C0 = {x : ⌘(x) t0}, C1 = {x : ⌘(x) � t1} [ C

c

0,

where t0 = t0(↵0), t1 = t1(↵1) are chosen such that P0{⌘(X) t0} = 1� ↵0, and65

P1{⌘(X) � t1} = 1� ↵1.

Remark 1. If ↵0 and ↵1 are small, then we expect that t1 < t0 and all sets C0 and C1 satisfyingthe constraints in (2) must overlap. In this paper we focus on the case t1 < t0 and C0 [ C1 = X .

Page 3: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 3

When t1 > t0, the solution to (2) is not unique, and the additional part Cc

0 is included in thedefinition of C1 in Theorem 1 so that C0 [ C1 = X . If t1 > t0, one may change the optimization 70

problem to minimize P (C0 [ C1), subject to P

j

(C

c

j

) ↵

j

(j = 0, 1) and C01 = ;. It followsfrom the proof of Theorem 1 that the unique optimal solution to this new problem is C0 = {x :

⌘(x) t0}, C1 = {x : ⌘(x) � t1}. Now X\(C0 [ C1) 6= ;, which corresponds to a region ofempty classification, indicating instances that are atypical in both classes and may even suggesta new, unseen class. 75

Remark 2. When the distribution of ⌘(X) is not continuous at t0 or t1, define L(t) ⌘ {x :

⌘(x) t}, L(t�) ⌘ {x : ⌘(x) < t}, and let t0 = inf{t : P0{L(t)} � 1� ↵0}. If P0{L(t�0 )} <

1� ↵0 < P0{L(t0)}, we can choose any C0 such that L(t�0 ) ✓ C0 ✓ L(t0) and P0(C0) = 1�↵0, provided that X is continuous on L(t0)\L(t�0 ). When X is not continuous on L(t0)\L(t�0 ),we can use randomized rules to achieve exact coverage. The set C1 can be constructed similarly. 80

2·2. Overall coverageWhen the overall coverage is of interest, the optimization problem becomes

minimize P (C0 \ C1)

subject to C0 [ C1 = X , ⇡0P0(C0) + ⇡1P1(C1) � 1� ↵.

(3)

We assume that ↵ < min(⇡0,⇡1), otherwise one can classify everything to the majority class toachieve the desired coverage with no ambiguity.

For (↵0,↵1) 2 (0, 1)

2, let ⌫(↵0,↵1) be the optimal value in problem (2), which is the mini- 85

mum ambiguity. The next lemma, proved in Appendix A·1, characterizes the solution to (3).

LEMMA 1. Suppose that (C⇤0 , C

⇤1 ) achieves the minimum of problem (3). Then (C

⇤0 , C

⇤1 ) is

a minimizer of problem (2) with (↵0,↵1) = (↵

⇤0,↵

⇤1), where (↵

⇤0,↵

⇤1) solves the optimization

problem

minimize ⌫(↵0,↵1), subject to 0 ↵0,↵1 1, ⇡0↵0 + ⇡1↵1 = ↵. (4)

According to Lemma 1 and Theorem 1, a strategy to solve (3) is to first obtain (↵

⇤0,↵

⇤1) by 90

solving (4), and then solve (2) with (↵

⇤0,↵

⇤1). How do we solve (4)? For any ↵0 2 (0,↵/⇡0), the

constraint requires ↵1 = ↵1(↵0) = (↵� ⇡0↵0)/⇡1, so the objective function ⌫ is a function of↵0. The next lemma shows that ⌫ is a convex function when ⌘(X) has a continuous distribution.It confirms the intuition that the best ↵0 must balance errors from both classes and the ambiguitywill first decrease and then increase as ↵0 varies from 0 to ↵/⇡0. It also lays the foundation of 95

our algorithm to solve (4), because strong convexity enables us to approximate ↵⇤0 by minimizing

⌫(·), a good approximation to ⌫(·).

LEMMA 2. Let ⌫(↵0) = ⌫{↵0,↵1(↵0)}. If the distributions of ⌘(X) under P0 and P1 arecontinuous, then ⌫(↵0) is a convex function.

The proof of Lemma 2 in Appendix A·1 gives explicit expressions for ⌫

0(↵0) and 100

00(↵0). Moreover, if ⌘(X) has positive density on its support, then lim

↵0#0 ⌫0(↵0) < 0 and

lim

↵0"(↵/⇡0) ⌫0(↵0) > 0, and there is an ↵

⇤0 2 (0,↵/⇡0) that minimizes ⌫(↵0). Finally, if

⌫(↵0) > 0 for all ↵0 2 (0,↵/⇡0) then ⌫ is strictly convex and the minimizer ↵⇤0 is unique.

Page 4: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

4 J. LEI

3. ESTIMATION PROCEDURES

3·1. Estimation with class-specific coverage105

Let {(Xi

, Y

i

) : 1 i n} be a random sample from P . Recall that 1I(·) is the indicator func-tion. For j 2 {0, 1}, let n

j

= #{i : Yi

= j} and define

j

= n

j

/n,

ˆ

P

j

(C) = n

�1j

X

i:Yi=j

1I(Xi

2 C).

For j = 0, 1, let Xj,1, ..., Xj,nj be the sample predictors in class j. Given ↵

j

2 (0, 1) and anyestimate ⌘(x) of ⌘(x) = pr(Y = 1 | X = x), the classification region C

j

is estimated by

ˆ

C0 =�

x : ⌘(x) ˆ

t0(↵0)

,

ˆ

C1 =�

x : ⌘(x) � ˆ

t1(↵1)

,

(5)

where ˆt0(↵0) is the bn0↵0cth largest value in {⌘(X0,1), ..., ⌘(X0,n0)}, and ˆ

t1(↵1) is the bn1↵1cthsmallest value in {⌘(X1,1), ..., ⌘(X1,n1)}. Here ˆ

t

j

(↵

j

) is an empirical version of t

j

given inTheorem 1. The performance of ˆ

C0 and ˆ

C1 depends on the accuracy of ⌘ and the regularity of110

P0, P1. We will assume that ⌘ satisfies the following accuracy property.

DEFINITION 1. An estimator ⌘ is (�n

, ⇢

n

)-accurate if pr(k⌘ � ⌘k1 � �

n

) ⇢

n

.

As we will see from examples in Section 3·3, many common estimators ⌘ are (�

n

, ⇢

n

)-accuratewith �

n

! 0 and ⇢

n

! 0.For the regularity of P

j

, let Gj

be the cumulative distribution function of ⌘(X) under Pj

. Then115

we have t0 = G

�10 (1� ↵0) and t1 = G

�11 (↵1). We consider the following margin condition.

(MA) There exist positive constants b1, b2, ✏0, and � such that for j = 0, 1 and all ✏ 2 [�✏0, ✏0],

b1|✏|� |Gj

(t

j

+ ✏)�G

j

(t

j

)| b2|✏|� . (6)

Condition (MA) characterizes the steepness of Gj

near the cut-off levels. Similar margin con-ditions have been used in the estimation of density level sets (Polonik, 1995; Tsybakov, 1997),and classification (Audibert & Tsybakov, 2007; Tong, 2013). Compared with other versions of120

margin condition in the literature, condition (MA) has an extra lower bound part, because ourmethod does not assume any knowledge of the cut-off value t

j

and must estimate it from thedata.

THEOREM 2. If ⌘ is (�

n

, ⇢

n

)-accurate, and (MA) holds, then for each r > 0 there exists apositive constant c such that with probability at least 1� ⇢

n

� n

�r,125

P

j

(

ˆ

C

j

4C

j

) c

(

n

+

log n

n

12

)

, j = 0, 1. (7)

The proof is given in Appendix A·2. Compared with related results in density level set esti-mation, for example, Rigollet & Vert (2009), Theorem 2 has an extra (log n/n)

1/2 term becausewe need to estimate the cut-off value t

j

. A large value of � means that Pj

has little mass near thecontour {x : ⌘(x) = t

j

}, so estimating t

j

is difficult and the convergence rate will be dominatedby (log n/n)

1/2. We further discuss the sharpness of Theorem 2 in Example 1 below. Some re-130

lated results in the study of tolerance regions can be found in Cadre et al. (2013) and Lei et al.(2013).

Page 5: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 5

3·2. Estimation with total coverageNow consider overall coverage control as described in Section 2·2. First let ⇡

j

= n

j

/n forj = 0, 1 and ↵+ = ↵/⇡0. For all ↵0 2 [0, ↵+], let ↵1 = ↵1(↵0) = (↵� ⇡0↵0)/⇡1, and con- 135

struct ( ˆC0,ˆ

C1) with class-specific coverages 1� ↵0 and 1� ↵1, respectively, using the methodgiven in Section 3·1. Let ⌫(↵0) = n

�1P

i

1I(Xi

2 ˆ

C01) be the empirical ambiguity, and ↵

⇤0 =

argmin

↵02[↵,↵] ⌫(↵0), where [↵, ↵] ⇢ (0,↵/⇡0) is an interval to be chosen by the user. Theestimated classification sets ˆ

C0, ˆ

C1 are those corresponding to ↵0 = ↵

⇤0. The reason for not

searching over the entire range [0,↵/⇡0] is to avoid complicated conditions on the function G

j

140

near 0 and 1. In practice one can choose [↵, ↵] = [0.01↵/⇡0, 0.99↵/⇡0].

THEOREM 3. Assume that 0 < b1 G

0j

(t

j

) b2 < 1 for all ↵0 in an open interval con-taining [↵, ↵], that ↵⇤

0 2 [↵, ↵] with ⌫

00(↵

⇤0) > 0, and that ⌘ is (�

n

, ⇢

n

)-accurate. Then for anyr > 0, there exists constant c > 0 such that |↵⇤

0 � ↵

⇤0| c{�1/2

n

+ (log n/n)

1/4} with probabil-ity at least 1� ⇢

n

� n

�r for n large enough. Moreover, with same probability, the resulting ˆ

C

j

145

(j = 0, 1) satisfy P

j

(

ˆ

C

j

�C

⇤j

) c

0{�1/2n

+ (log n/n)

1/4} for another constant c0.

The bound on G

0j

is equivalent to assuming that (MA) holds with � = 1 for all tj

as ↵0 rangesfrom ↵ to ↵. The condition ⌫

00(↵

⇤0) > 0 is satisfied when ⌫(↵0) > 0 for all ↵0, as implied by

Lemma 2. The rate is slower than that in Theorem 2, because the optimal ↵⇤0 is unknown and

needs to be estimated first. 150

3·3. ExamplesWe consider two examples of ⌘: local polynomial regression (Audibert & Tsybakov, 2007),

and `1-penalized logistic regression (van de Geer, 2008).

Example 1. Assume that X = [�1, 1]

d. For any s = (s1, ..., sd

) 2 (Z+)

d, where Z+ is the setof nonnegative integers, and z 2 Rd, define z

s

= z

s11 ⇥ ...⇥ z

sdd

and |s| =P

d

j=1 |sj |. Let K bea kernel function and ⌧ > 0 a bandwidth. The local polynomial estimator (Tsybakov, 2009) isbased on the intuition of approximating ⌘(·) at x using a polynomial of order `,

x

(z) =

X

s:|s|`

v

s,x

z � x

s

.

The local coefficients (vs,x

)

s:|s|`

are estimated by weighted least squares,

(v

s,x

)

s:|s|`

= argmin

v

n

X

i=1

8

<

:

Y

i

�X

s:|s|`

v

s

X

i

� x

s

9

=

;

2

K

X

i

� x

,

and the local polynomial estimator ⌘(x) is the value of ⌘x

(z) evaluated at z = x,

⌘(x) = v0,x . (8) 155

PROPOSITION 1. In the setting of Example 1, assume that (a) the marginal density of X isbounded and bounded away from zero, and (b) ⌘(·) belongs to a Holder class with smoothnessparameter �. Then there exist choices of kernel K and bandwidth ⌧ = ⌧

n

such that for any r > 0,the local polynomial estimator ⌘ given in equation (8) is (�

n

, ⇢

n

)-accurate with

n

= c

log n

n

�/(2�+d)

, ⇢

n

= n

�r

,

Page 6: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

6 J. LEI

where c is a positive constant depending on r.

Despite its familiar form (Stone, 1982; Tsybakov, 2009), we could not find a proof of thisresult in the literature. For completeness, we give more details of Proposition 1, including aproof, in the Supplementary Material.

Combining Proposition 1 and Theorem 2, if (MA) holds with � = 1, then with probability atleast 1� 2n

�r we have

P

j

(

ˆ

C

j

4C

j

) c

log n

n

�/(2�+d)

, j = 0, 1 .

When P1 has uniform density and P0 has bounded density, estimating C0 is equivalent to a160

density level set problem, where the cut-off density level is implicitly determined by ↵0. In thiscase, our upper bound on P0(

ˆ

C0�C0) matches the minimax rate of density level set estimationgiven by Rigollet & Vert (2009). A related rate of convergence has been obtained for the excessrisk of plug-in rules in Neyman–Pearson classification in a recent paper (Tong, 2013).

Example 2. Let X = [�1, 1]

d and var{X(k)} = �

2 for all 1 k d, where X(k) is the kth165

coordinate of X . Assume that ⌘(X)/{1� ⌘(X)} = exp(X

T

⇤) for some ✓

⇤ 2 Rd. The coeffi-cient ✓⇤ and function ⌘(·) can be estimated by first estimating ✓ using the `1-penalized logisticregression

ˆ

✓ = argminn

�1n

X

i=1

�Y

i

X

T

i

✓ + log{1 + exp(X

T

i

✓)}⇤

+ �

n

k✓k1. (9)

Such regression is typically used when d is large, and the number of true signals, k✓⇤k0, is rel-atively small. The convergence of `1-penalized logistic regression has been extensively studied.170

The following result is a consequence of Example 1 in van de Geer (2008).

PROPOSITION 2. Under the conditions in Example 2, assume that the smallest eigenvalueof E(XX

T

) is bounded away from zero by a constant. Let ⌘(x) = exp(x

T

ˆ

✓)/{1 + exp(x

T

ˆ

✓)}with ˆ

✓ given by (9). Then one can choose �

n

such that ⌘ satisfies (�n,d

, ⇢

n,d

)-accuracy with

n,d

c1

log d

n

14

, ⇢

n,d

c2

(

1

d

+

log d

n

12

k✓⇤k0

)

for positive constants c1, c2.

In the setting of Example 2, assume that the conditions of Proposition 2 hold and that (MA)holds with � = 1. Let ⌘ and ˆ

C

j

be the output of `1-penalized regression with appropriate choiceof �

n

. We can choose r large enough in Theorem 2, so that

P

j

(

ˆ

C

j

4C

j

) c1

(

log d

n

14

+

log n

n

12

)

, j = 0, 1

with probability at least 1� c2{d�1+ (log d/n)

1/2k✓⇤k0}, for some constants c1, c2.

4. ROBUSTNESS AND TUNING PARAMETER SELECTION

4·1. Robust error control175

The theoretical results presented in Theorems 2 and 3 presuppose that ⌘ is an accurate approxi-mation to ⌘. In practice, such an assumption can be violated, for example, when local polynomial

Page 7: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 7

estimation is applied to a non-smooth distribution, or when the logistic regression model is not agood approximation to the truth. The method described in Section 3 can be easily modified suchthat the coverage is controlled on average in the sense that 180

E

n

P

j

(

ˆ

C

j

)

o

� 1� ↵

j

, (10)

for any distribution P and any estimator ⌘.The modified method uses sample splitting. First the index set {1, ..., n} is randomly split

into two parts, I1 and I2. Then ⌘ is estimated from the fitting subsample {(Yi

, X

i

) : i 2 I1},and evaluated on the ranking subsample {X

i

: i 2 I2}, yielding Zj

= {⌘(Xi

) : i 2 I2, Yi = j},j = 0, 1. Let ˆt

j

be the b|Zj

|↵j

cth largest or smallest value in Zj

, according to j = 0 or 1. The 185

estimator is ˆ

C0 = {x : ⌘(x) ˆ

t0}, ˆ

C1 = {x : ⌘(x) � ˆ

t1}. The extension to total coverage isstraightforward.

PROPOSITION 3. For j = 0, 1, let ˆ

C

j

be given by the sample splitting procedure. If(Y

i

, X

i

)

n

i=1 are independent and identically distributed, then the corresponding set-valued clas-sifier satisfies (10). 190

Proposition 3 is based on a result in conformal prediction (Vovk et al., 2005). A proof can befound in Lemma 2.1 of Lei et al. (2014). The only assumptions are independence and identicaldistribution. Proposition 3 requires no assumption on the estimator ⌘ or the underlying distri-bution. When the class proportion pr(Y = 0) is different in the training and testing sample, theclass-specific error control in eq. (10) still holds as long as the distribution P

j

remains the same. 195

Theorems 2 and 3 hold for ˆ

C

j

obtained by the sample splitting procedure when |I1| and |I2| arelower bounded by a constant fraction of n.

4·2. Cross-validated ambiguityIn our examples, the local polynomial estimator involves two tuning parameters: the polyno-

mial degree and the bandwidth; and penalized logistic regression depends crucially on �

n

. These 200

tuning parameters must be chosen in a data-driven manner. A natural idea is to choose a tuningparameter that minimizes the empirical ambiguity. To avoid overfitting, we can split the sampleand use one part to find ⌘ and the other to choose the tuning parameter. Let ⇤ = {�1, ...,�T

}be the set of candidate tuning parameters. For each � 2 ⇤, we can fit ⌘

using the first subsam-ple and compute (

ˆ

C0,ˆ

C1) and empirical ambiguity ˆA(�) from the second subsample. Then we 205

choose ˆ

⇤= argmin

ˆA(�). This procedure can also be modified to a V-fold cross validation. Asshown in Section 6, the sample splitting approach gives good empirical performance.

The output of the sample splitting procedure introduced here is an optimal ˆ�⇤, which is thenused to obtain ⌘ = ⌘

⇤ . Such a sample splitting for tuning parameter selection should not beconfused with that introduced in Section 4·1. Theoretically speaking, in order to perform tuning 210

parameter selection and achieve finite sample coverage, one needs to split the training sampleinto a fitting subsample and a ranking subsample as in Section 4·1, and further split the fittingsubsample to obtain an estimate of ⌘ using a data driven tuning parameter. However, in practicesplitting into two subsamples usually works well enough, where the ranking subsample is usedfor both selecting tuning parameters and estimating cut-off values. 215

Page 8: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

8 J. LEI

Table 1. Coverage (%) and ambiguity (%) under a Gaussian mixture model.spar = 1 spar = 0.5

Noncover 0 Noncover 1 Ambiguity Noncover 0 Noncover 1 AmbiguityIdeal 5.00 5.00 31.1 5.00 5.00 31.1Method 1 4.83 (0.10) 4.76 (0.20) 34.1 (0.65) 5.74 (0.12) 8.55 (0.21) 26.8 (0.46)Method 2 4.55 (0.17) 4.19 (0.28) 39.1 (1.15) 4.44 (0.17) 4.43 (0.22) 46.9 (1.03)Method 3 0.87 (0.04) 9.24 (0.29) 34.1 (0.68) 1.82 (0.07) 13.5 (0.26) 26.4 (0.46)

Percentage of coverage and ambiguity for different methods under a Gaussian mixture model: (X ||Y = 0) ⇠ N(�1, 1), (X | Y = 1) ⇠ N(1, 1), ⇡0 = 0.75, ⇡1 = 0.25. Method 1: classification withconfidence; Method 2: classification with confidence and robust implementation; Method 3: classifi-cation with rejection. Reported are the average numbers in percentage over 100 independent samples,with estimated standard error in parenthesis. spar = 1 corresponds to cross validation tuning, andspar = 0.5 is chosen for illustration.

5. SIMULATION

We present a simulation study to illustrate the difference between the proposed frameworkand classification with rejection, and to demonstrate the finite sample performance of the robustimplementation introduced in Section 4·1.

To highlight the main idea, we consider a simple Gaussian mixture model: (X | Y = 0) ⇠220

N(�1, 1), (X | Y = 1) ⇠ N(1, 1), ⇡0 = 3/4, ⇡1 = 1/4. The target coverage is ↵0 = ↵1 =

0.05. The conditional probability function ⌘ is estimated using the R function smooth.spline.Three plug-in methods are compared: classification with confidence, the robust implementa-tion described in Section 4, and classification with rejection; all are based on the same es-timated ⌘. In our notation, an estimate given by the classification with rejection approach is225

ˆ

C0 = {x : ⌘(x) 0.5 + k}, ˆ

C1 = {x : ⌘(x) � 0.5� k} for some k 2 [0, 0.5). In our simula-tion k is chosen such that ˆ

C0 \ ˆ

C1 contains the same number of sample points as in the ambigu-ous region in the classification with confidence approach.

The R function smooth.spline requires a smoothness tuning parameter spar. We use two valuesof spar: 1 and 0.5, with a sample size of n = 500. In this case, spar = 1 is a reasonably good230

choice of smoothing parameter. The median value of cross-validated spar over 100 simulationsis 1.006. In the second estimate, we intentionally use a bad value of tuning parameter spar = 0.5

to illustrate the finite sample coverage guarantee of the robust implementation. The simulation isrepeated 100 times and the results are summarized in Table 1.

The simulation results reveal a fundamental difference between the proposed framework and235

classification with rejection. When the two methods are set to have ambiguous regions of similarsize, the proposed method approximately achieves the target class-wise coverage levels, whileclassification with rejection tends to have imbalanced performance between classes. When thesmoothness parameter is chosen inappropriately, the proposed method no longer has the asymp-totic coverage guarantee. One can still use the robust implementation, which gives correct cov-240

erage on average, at the expense of having a larger ambiguous region.

6. DATA EXAMPLE

6·1. The hand-written zip code dataIn this section we illustrate our method on the zip code data. The data consists of 16⇥16

pixel images of hand-written digits. Each image has a label in {0, 1, ..., 9}. This data set has245

been used to test pattern recognition (Le Cun et al., 1990) and classification algorithms (Hastie

Page 9: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 9

Table 2. Coverage (%) and ambiguity (%) in zip code data.Noncover 0 Noncover 1 Total Noncover Ambiguity �n ⇥ 10

3

`1-Logistic 1.4 11.4 3.3 0 1.84Class-specific coverage 5.5 6.0 5.6 1.9 1.49Overall coverage 0.9 10.08 2.8 3.3 1.49

Performance summary of classification with confidence, with comparison to the standard `1-penalizedlogistic regression. ↵0 = ↵1 = 0.05 for class-specific error control; ↵ = 0.03 for overall error control.

Fig. 1. Ambiguous images in the ranking subsample (18out of 1014). Class-specific coverage ↵0 = ↵1 = 0.05.

et al., 2009). Examples of the images can be found in Le Cun et al. (1990). We choose this dataexample because the ambiguous cases are easy to interpret visually.

In order to make an imbalanced binary classification problem, we use the subset of data con-taining digits {0, 6, 8, 9}, which are digits with circles. Images corresponding to digits 0, 6, and 250

9 are labeled as class 0, and those of digit 8 are labeled as class 1. The training sample contains3044 images, with 542 in class 1. The test sample contains 872 images, with 166 in class 1.

6·2. Class-specific coverageWe apply `1-penalized logistic regression on the training data set with ↵0 = ↵1 = 0.05. The

robust implementation is carried out by using two-thirds of training data as the fitting subsample, 255

and the remainder as the ranking subsample. The tuning parameter �n

is selected by minimizingthe empirical ambiguity in the ranking subsample. The resulting set-valued classifier ˆh is thenvalidated on the testing data.

Table 2 summarizes the performance of our method and compares it with the ordinary binaryclassifier given by the `1-penalized logistic regression using standard 5-fold cross-validation. We 260

look at four measurements: noncoverage for class 0; noncoverage for class 1; total noncoverage;ambiguity.

Although ordinary binary classification gives a small overall mis-classification rate with noambiguity, the mis-classfication rate for class 1 is much higher. Our procedure gives noncoveragerates near the nominal levels for both classes, with a small ambiguity. Figure 1 displays the 18 265

ambiguous images in the ranking subsample. Many of these images exhibit some pattern ofabnormal hand-writing. They are hard to classify by algorithm but can be classified visually.

Figure 2 provides some further insights into the performance of our procedure, supportingthe theory developed earlier. The empirical coverage is close to the nominal level for almostthe entire range of �

n

. This agrees with Proposition 3. In the right panel, the empirical ambi- 270

Page 10: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

10 J. LEI

-10 -8 -6 -4 -2

0.0

0.2

0.4

0.6

0.8

log(lambda)

mis

sing

rate

-10 -8 -6 -4 -2

0.0

0.2

0.4

0.6

log(lambda)

ambiguity

Fig. 2. Effects of tuning parameter on non-coverage ratesand ambiguity using class-specific coverage with ↵0 =

↵1 = 0.05. Left panel: non-coverage rate as a function oflog(�) for class 0 (solid) and class 1 (dash). The grey linemarks the nominal noncoverage rate of 0.05. Right panel:empirical ambiguity as a function of log(�) for trainingsample (solid) and test sample (dash). The grey line indi-cates the value of log(�) that minimizes empirical ambi-

guity in the training sample.

guity curves calculated from the test and training data are very close, because in both cases theempirical ambiguity is evaluated using a random sample independent of ⌘.

6·3. Overall coverageIn controlling overall coverage as discussed in Sections 2·2 and 3·2, we choose ↵ = 0.03. The

method described in Section 3·2 is applied to find ˆ

C0 and ˆ

C1 by searching for the best ↵⇤0 that275

minimizes the empirical ambiguity in the ranking subsample. The tuning parameter is selected byminimizing estimated ambiguity with the same data split as described in the previous subsection.The result is summarized in the bottom row of Table 2, where the overall error rate is boundedby the nominal level.

Figure 3 shows the test data noncoverage rate and ambiguity as a function of �n

. The tuning280

parameter has little effect on noncoverage rates, as claimed in Proposition 3, but does affect theambiguity. The ambiguity is systematically higher in the test sample than in the training sample,because we choose ↵

⇤0 by minimizing empirical ambiguity in the ranking subsample, which is

then plugged in for the test sample without searching for a new ↵

⇤0. Nevertheless, minimizing

empirical ambiguity still leads to a reasonable choice of �n

. In the right panel of Figure 3, the285

plotted curve does reflect a convex shape with a unique minimum.

7. DISCUSSION

The confidence level of classification is quite similar to the significance level in statisticalhypothesis testing. Such a connection between classification and testing has appeared in theliterature. The proof of Lemma 2 of this paper uses ideas in Sun & Cai (2007, 2009), where the290

multiple testing problem is formulated via a classification problem.Although the optimal solution depends on ranking and thresholding ⌘(x), our framework is

applicable in more general settings. For example, many popular classification methods, such as

Page 11: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 11

-10 -8 -6 -4 -2

0.00

0.04

0.08

log(lambda)

mis

sed

cove

rage

rate

-10 -8 -6 -4 -2

0.00

0.05

0.10

0.15

0.20

log(lambda)

empi

rical

am

bigu

ity

0.005 0.015 0.025

0.00

0.10

0.20

0.30

alpha_0

empi

rical

am

bigu

ity

Fig. 3. Total coverage control for zip code data with ↵ =

0.03. Left panel: total error as a function of log(�). Thegrey line marks the nominal noncoverage rate of 0.03. Mid-dle panel: empirical ambiguity as a function of log(�) fortraining data (solid) and test data (dash). The grey linemarks the value of log(�) that minimizes the empirical am-biguity in the training sample. Right panel: empirical am-biguity as a function of ↵0 with �n = 1.49⇥ 10

�3. Thegrey line marks the value of ↵0 that minimizes the empiri-

cal ambiguity.

empirical risk minimization, are based on thresholding a function ˆ

f(x). Most of the argumentsdeveloped in this paper are still applicable when f , the population version of ˆ

f , is roughly a 295

monotone function of ⌘ in a neighborhood of the cut-off points.There are interesting extensions in both theory and methodology. First, it would be interesting

to ask what would happen to the ambiguity if a good approximation to the ideal procedure is notavailable. For example, naive Bayes classifiers have been shown to give competitive performance(Bickel & Levina, 2004) but are also known to be biased except under a naive Bayes model. The 300

same question could also be asked for classifiers with other ranking scores, such as data depth(Li et al., 2012).

Another extension is the multi-class case. In a k-class problem, the optimal procedure shallbe based on the vector ⌘(x) = {⌘

`

(x) : 1 ` k} with ⌘

`

(x) = pr(Y = ` | X = x). One candefine the ambiguity of a set-valued classifier in different ways. For example, both A(h) = 305

pr{|h(X)| � 2} (Vovk et al., 2005, Section 3) and A(h) = E{|h(X)|} agree with the definitionused in this work when k = 2. It is an open problem to find the corresponding ideal classifiersand consistent estimates. Moreover, the option of h(x) = ; for certain values of x is interest-ing for both practical and theoretical concerns. An example of possible applications is clinicaldecision-making such as dynamic treatment regimes (Laber et al., 2014). 310

ACKNOWLEDGEMENT

This research was partially supported by the U.S. National Science Foundation and the U.S.National Institutes of Health. The author is grateful to the editor, associate editor, and threereviewers for insightful comments that helped improving this paper. The author thanks ProfessorLarry Wasserman for many inspiring discussions. 315

SUPPLEMENTARY MATERIAL

The Supplementary Material available online includes a proof of Proposition 1.

Page 12: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

12 J. LEI

TECHNICAL DETAILS

A·1. Proofs of Section 2Proof. (Theorem 1) Let C0, C1 be the classification regions given in Lemma 1. Let S0, S1 be the320

corresponding regions of any other classifier such that Pj(Sj) � 1� ↵j , for j = 0, 1. Without loss ofgenerality, we assume t0 � t1 since otherwise C0 \ C1 = ; and the claim is true. We also assume thatS0 [ S1 = X because otherwise we can always substitute S1 by S

01 = S1 [ [X\(S0 [ S1)] without af-

fecting the result and argument. Let S01 = S0 \ S1. Using the fact that ↵0 = P0(C0) P0(S0) we have

P0(C01 \ S

c0)� P0(C

c0 \ S01) P0(C

c0 \ S

c1)� P0(C

c1 \ S

c0). (A1)325

Canceling P0(C01 \ S01) in P0(C01) and P0(S01), we have

P0(C01)� P0(S01) = P0(C01 \ S

c1) + P0(C01 \ S

c0)� P0(C

c0 \ S01)� P0(C

c1 \ S01)

P0(C01 \ S

c1) + P0(C

c0 \ S

c1)� P0(C

c1 \ S

c0)� P0(C

c1 \ S01)

= P0(C01 \ S

c1) + P0(C

c0 \ S

c1)� [P0(C

c1 \ S

c0) + P0(C

c1 \ S01)]

= P0(C1 \ S

c1)� P0(C

c1 \ S1)330

1� t1

t1P1(C1 \ S

c1)�

1� t1

t1P1(C

c1 \ S1) 0.

In the above derivation, the first inequality follows from (A1). The second uses the fact that C1 \ S

c1 ✓ C1,

C

c1 \ S1 ✓ C

c1 and the definition of C1, as the likelihood ratio dP0/dP1 is greater than (1� t1)/t1 on C

c1

and smaller than (1� t1)/t1 on C1. The last holds because P1(S1) � 1� ↵1 = P1(C1).The proof is completed by realizing that P1(C01) P1(S01) can be derived using the same argument.⇤335

Proof. (Lemma 1) If (C⇤0 , C

⇤1 ) does not minimize problem (2) with (↵0,↵1) specified by (↵

⇤0,↵

⇤1), let

(C

00, C

01) be the minimizer so that P (C

001) < P (C01). On the other hand, (C 0

0, C01) is feasible for (2) and

hence it is also feasible for (3). This contradicts the fact that (C⇤0 , C

⇤1 ) is optimal for (3).

For the second claim, consider a different optimization problem

argmin ⌫(↵0,↵1)

subject to 0 ↵0,↵1 1, ⇡0↵0 + ⇡1↵1 ↵.

(4’)

It follows immediately from the first part that the optimal value of (4’) equals the optimal value of (3). The340

two problems (4) and (4’) are equivalent because ⌫(↵0,↵1) is decreasing in both ↵0 and ↵1 and hence theminimum of (4’) is achieved when ⇡0↵0 + ⇡1↵1 = ↵. ⇤

Proof. (Lemma 2) Let Gj(·) be the cumulative distribution function of ⌘(X) when X ⇠ Pj (j = 0, 1),and gj(·) be the corresponding density function. For a given ↵0 2 (0,↵/⇡0), let ↵1 = (↵� ⇡0↵0)/⇡1

according to the constraint in problem (4). Then the corresponding t0 and t1 in Theorem 1 are t0 =345

G

�10 (1� ↵0) and t1 = G

�11 (↵1). Let C0 = {x : ⌘(x) � t0} and C1 = {x : ⌘(x) t1}. Define

µ(↵0) =⇡0{G0(t0)�G0(t1)}+ ⇡1{G1(t0)�G1(t1)}=� ⇡0G0(t1) + ⇡1G1(t0) + ⇡0 � ↵ .

Differentiating over ↵0, we have

µ

0(↵0) =� ⇡0

dG0(t1)

d↵0+ ⇡1

dG1(t0)

d↵0= �⇡0g0(t1)

dt1

d↵0+ ⇡1g1(t0)

dt0

d↵0=

20

⇡1

g0(t1)

g1(t1)� ⇡1

g1(t0)

g0(t0).350

According to Corollary 1 of Sun & Cai (2009),

g1(t)

g0(t)=

t

1� t

⇡0

⇡1, µ

0(↵0) = ⇡0

1� t1

t1� ⇡0

t0

1� t0, µ

00(↵0) =

20

⇡1

1

t

21g1(t1)

+ ⇡01

(1� t0)2g0(t0)

,

so µ(↵0) is convex on the interval [0,↵/⇡0]. The claimed result follows by realizing that ⌫(↵0) =

max{µ(↵0), 0} is also convex. ⇤

Page 13: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 13

A·2. Proofs for Section 3 355

Let ˆ

Gj be the empirical cumulative distribution function of ⌘(Xj,1), ..., ⌘(Xj,nj ). Throughout thissubsection we will focus on the event

Er =

k⌘ � ⌘k1 �n, |⇡j � ⇡j | c(log nj/nj)1/2

, sup

t|Gj(t)� ˆ

Gj(t)| c(log nj/nj)1/2

,

which has probability at least 1� ⇢n � n

�r for some constant c depending on r only. To see this, usingHoeffding’s inequality, pr{|⇡j � ⇡j | � c(log n/n)

1/2} n

�r/2. Then using the result of Massart (1990)

we have pr{supt |Gj(t)� ˆ

Gj(t)| � c(log nj/nj)1/2} n

�r/2. In both cases c depends on r only. The

value of constant c, as well as c1, c2 below, may vary from one line to another.The following lemma shows that ˆtj is a good approximation to tj . 360

LEMMA A1. On Er, the ˆ

tj(↵j) (j = 0, 1) used in eq. (5) satisfy, for n large enough,

|ˆtj(↵j)� tj | c

(

�n +

log n

n

12�

)

.

Proof. We prove the result for j = 1. The argument for j = 0 is the same.Let ˆ

P1 be the empirical probability distribution that assigns probability 1/n1 at each X1,i for i =

1, ..., n1. Denote L

`(t) = {x 2 X : ⌘(x) t}, and ˆ

L

`(t) = {x 2 X : ⌘(x) t}. Then

ˆ

P1{ˆL`(t)} ˆ

P1{L`(t+ �n)} =

ˆ

G1(t+ �n) G1(t+ �n) + c

log n1

n1

◆1/2

, t 2 [0, 1] .

Let t01 = t1 � �n � {2cb�11 (log n1/n1)

1/2}1/� , where b1 is the constant in (MA). For n and n1 large 365

enough we have n

�11 < c(log n1/n1)

1/2, and �n + {2cb�11 (log n1/n1)

1/2}1/� ✏0, with ✏0 defined in(MA). Then

ˆ

P1{ˆL`(t

01)} G1

h

t1 � {2cb�11 (log n1/n1)

1/2}1/�i

+ c

log n1

n1

◆1/2

G1(t1)� c(log n1/n1)1/2

=↵1 � c(log n1/n1)1/2

< ↵1 � n

�11 bn1↵1cn�1

1 ˆ

P1{ˆL`(

ˆ

t1)} .

where the second last step uses (MA). Therefore,

ˆ

t1 � t1 � �n � {2cb�11 (log n1/n1)

1/2}1/� .

Similarly, one can show that ˆt1 t1 + �n + {2cb�11 (log n1/n1)

1/2}1/� . The claimed result follows by 370

picking a larger constant c so that n1 can be replaced by n. ⇤

Proof. (Theorem 2) We give the proof for j = 1. Under assumptions in the theorem, and according toLemma 1, we have, on event Er,

P1(ˆ

C1\C1) =P1{⌘(X) � ˆ

t1, ⌘(X) < t1} P1

(

t1 � 2�n � c

log n

n

◆1/2�

⌘(X) < t

)

b2

(

2�n + c

log n

n

◆1/2�)�

2

�b2

(

2

��

�n + c

log n

n

◆1/2)

, 375

where the last inequality comes from condition (MA) and holds when n is large enough so that 2�n +

c(log n/n)

1/2� ✏0. The other parts can be argued similarly. ⇤

Proof. (Theorem 3) Recall that on Er, we have, for some c1, c2,

|ˆt0 � t0| c1{�n + (log n/n)

1/2}, ↵0 2 [↵,↵], (A2)

Page 14: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

14 J. LEI

and |⇡0 � ⇡0| c2(log n/n)1/2. Then for n large enough, Lemma 1 implies that

|ˆt1(↵1)� t1| |ˆt1(↵1)� t1(↵1)|+ |G�11 (↵1)�G

�11 (↵1)|380

c1{�n + (log n/n)

1/2}+ c

02(log n/n)

1/2, ↵0 2 [↵,↵] (A3)

where the first part follows from that (MA) holds with � = 1, and the second part follows from that G�11

is Lipschitz as implied by (MA).Let Pn be the empirical marginal distribution of X . Then for n large enough we have, on Er,

⌫(↵0)� ⌫(↵0) =Pn

ˆ

t1(↵1) ⌘(X) ˆ

t0(↵0)

� P {t1 ⌘(X) t0}385

Pn

ˆ

t1(↵1)� �n ⌘(X) ˆ

t0(↵0) + �n

� P {t1 ⌘(X) t0}=Pn

ˆ

t1(↵1)� �n ⌘(X) ˆ

t0(↵0) + �n

� P

ˆ

t1(↵1)� �n ⌘(X) ˆ

t0(↵0) + �n

+ P

ˆ

t1(↵1)� �n ⌘(X) ˆ

t0(↵0) + �n

� P {t1 ⌘(X) t0}c{�n + (log n/n)

1/2},

where in the last inequality, the first part is bounded, up to a constant factor, by (log n/n)

1/2 using standard390

empirical process theory, and the second part is bounded by �n + (log n/n)

1/2 using (A2), (A3), and theassumption that Gj has bounded density. The other direction �⌫(↵0) + ⌫(↵0) can be treated similarly.The first claim follows from strong convexity and uniform approximation of ⌫ to ⌫.

Next we prove the second part for ˆ

C

⇤0 . The proof for ˆ

C

⇤1 is similar. On the event in the first claim,

⇤0 2 [↵, ↵]. By the assumptions, the claim of Lemma 1 holds uniformly for all ↵0 2 [↵, ↵]. Thus395

P0(ˆ

C

⇤0�C

⇤0 ) P0{ ˆC⇤

0�C0(↵⇤0)}+ P0{C0(↵

⇤0)�C

⇤0}

c{�n + (log n/n)

1/2}+ |↵0 � ↵

⇤0| c

0{�1/2n + (log n/n)

1/4} .

REFERENCES

AUDIBERT, J.-Y. & TSYBAKOV, A. B. (2007). Fast learning rates for plug-in classifiers. The Annals of Statistics 35,608–633.400

BICKEL, P. J. & LEVINA, E. (2004). Some theory for Fisher’s linear discriminant function, ‘naive Bayes’, and somealternatives when there are many more variables than observations. Bernoulli 10, 989–1010.

CADRE, B., PELLETIER, B. & PUDLO, P. (2013). Estimation of density level sets with a given probability content.Journal of Nonparametric Statistics 25, 261–272.

CHOW, C. K. (1970). On optimum recognition error and reject tradeoff. IEEE Transactions on Information Theory405

16, 41–46.HAN, M., CHEN, D. & SUN, Z. (2008). Analysis to Neyman–Pearson classification with convex loss function.

Analysis in Theory and Applications 24, 18–28.HANCZAR, B. & DOUGHERTY, E. R. (2008). Classification with reject option in gene expression data. Bioinformat-

ics 24, 1889–1895.410

HASTIE, T. J., TIBSHIRANI, R. J. & FRIEDMAN, J. H. (2009). The Elements of Statistical Learning. New York:Springer-Verlag, 2nd ed.

HERBEI, R. & WEGKAMP, M. H. (2006). Classification with rejection option. The Canadian Journal of Statistics34, 709–721.

LABER, E. B., LIZOTTE, D. J. & FERGUSON, B. (2014). Set-valued dynamic treatment regimes for competing415

outcomes. Biometrics 70, 53–61.LE CUN, Y., BOSER, B., DENKER, J. S., HENDERSON, D., HOWARD, R. E., HUBBARD, W. & JACKEL, L. D.

(1990). Handwritten digit recognition with a back-propagation network. In Advances in Neural InformationProcessing Systems 2. Proceedings of the 1989 Conference, D. S. Touretzky, ed. San Francisco, CA, USA: MorganKaufmann.420

LEI, J., RINALDO, A. & WASSERMAN, L. (2014). A conformal prediction approach to explore functional data.Annals of Mathematics and Artificial Intelligence , in press.

LEI, J., ROBINS, J. & WASSERMAN, L. (2013). Distribution free prediction set. Journal of the American StatisticalAssociation 108, 278–287.

LEI, J. & WASSERMAN, L. (2014). Distribution free prediction bands for nonparametric regression. Journal of the425

Royal Statistical Society, Series B 76, 71–96.

Page 15: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 15

LI, J., CUESTAS-ALBERTOS, J. A. & LIU, R. Y. (2012). DD-classifier: Nonparametric classification procedurebased on dd-plot. Journal of the American Statistical Association 107, 737–753.

MASSART, P. (1990). The tight constant in the Dvoretzky–Kiefer–Wolfowitz inequality. The Annals of Probability ,1269–1283. 430

NADEEM, M. S. A., ZUCKER, J.-D. & HANCZAR, B. (2010). Accuracy-rejection curves (arcs) for comparingclassification methods with a reject option. Journal of Machine Learning Research-Proceedings Track 8, 65–81.

POLONIK, W. (1995). Measuring mass concentrations and estimating density contour clusters - an excess massapproach. The Annals of Statistics 23, 855–881.

RIGOLLET, P. & TONG, X. (2011). Neyman–Pearson classification under a strict constraint. Journal of Machine 435

Learning Research-Proceedings Track 19, 595–614.RIGOLLET, P. & VERT, R. (2009). Optimal rates for plug-in estimators of density level sets. Bernoulli 14, 1154–

1178.SCOTT, C. & NOWAK, R. (2005). A Neyman–Pearson approach to statistical learning. IEEE Transactions on

Information Theory 51, 3806–3819. 440

SHAFER, G. & VOVK, V. (2008). A tutorial on conformal prediction. Journal of Machine Learning Research 9,371–421.

SUN, W. & CAI, T. (2007). Oracle and adaptive compund decision rules for false discovery rate control. Journal ofthe American Statistical Association 102, 901–912.

SUN, W. & CAI, T. T. (2009). Large-scale multiple testing under dependence. Journal of the Royal Statistical 445

Society: Series B (Statistical Methodology) 71, 393–424.TONG, X. (2013). A plug-in approach to Neyman–Pearson classification. Journal of Machine Learning Research 14,

3011–3040.TSYBAKOV, A. B. (1997). On nonparametric estimation of density level sets. The Annals of Statistics 25, 948–969.TSYBAKOV, A. B. (2009). Introduction to Nonparametric Estimation. New York: Springer. 450

VAN DE GEER, S. A. (2008). High-dimensional generalized linear models and the lasso. The Annals of Statistics 36,614–645.

VOVK, V. (2013). Conditional validity of inductive conformal predictors. Machine Learning 92, 349–376.VOVK, V., GAMMERMAN, A. & SHAFER, G. (2005). Algorithmic Learning in a Random World. New York: Springer.VOVK, V., NOURETDINOV, I. & GAMMERMAN, A. (2009). On-line predictive linear regression. The Annals of 455

Statistics 37, 1566–1590.YUAN, M. & WEGKAMP, M. (2010). Classification methods with reject option based on convex risk minimization.

Journal of Machine Learning Research 11, 111–130.

Page 16: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Biometrika (2014), xx, x, pp. 1–4

C

�2007 Biometrika Trust

Printed in Great Britain

Supplementary material for “Classification with Confidence”

BY JING LEI

Department of Statistics, Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh,Pennsylvania, 15215, U.S.A

[email protected] 5

1. BACKGROUND OF LOCAL POLYNOMIAL ESTIMATOR

Assume X = [�1, 1]d. For any s = (s1

, ..., sd) 2 (Z+

)

d, where Z+

is the set of nonnegative

integers, and z 2 Rd, define |s| =

P

1kd sk and zd = zs11

. . . zsdd . Let K be a kernel function

and ⌧ > 0 a bandwidth. The local polynomial estimator for ⌘(x) is

⌘(x) = v0

(x), (1) 10

where

v(x) = {vs(x)}s:|s|` = argmin

v

nX

i=1

8

<

:

Yi �X

s:|s|`

vs

Xi � x

◆s9

=

;

2

K

Xi � x

.

To prove consistency of ⌘(x), we assume that ⌘(x) = pr(Y = 1 | X = x) belongs to a H¨older

class ⌃(�, L), and that K is a valid kernel function. The following definitions are commonly used

in nonparametric statistics (Tsybakov, 2009).

For any sufficiently smooth function f : Rd 7! R, define Dsto be the differential operator:

Dsf =

@|s|f

@xs11

· · · @xsdd(x

1

, ..., xd).

Given � > 0, for any function f that is b�c times differentiable, denote its Taylor expansion of

degree b�c at x0

by

f (�)x0

(x) =X

|s|�

(x� x0

)

s

s1

! · · · sd!Dsf(x

0

).

DEFINITION 1. For constants � > 0, L > 0, define the Holder class ⌃(�, L) to be the set ofb�c-times differentiable functions on Rd such that, 15

|f(x)� f (�)x0

(x)| Lkx� x0

k� . (2)

A standard condition on the kernel is the notion of �-valid kernels.

DEFINITION 2. For any � > 0, function K : Rd 7! R1 is a �-valid kernel if (a) K is sup-ported on [�1, 1]d; (b)

R

K = 1; (c)R

|K|r < 1, all r � 1; (d)R

ysK(y)dy = 0 for all1 |s| �.

Remark 1. The assumption that X = [0, 1]d can be generalized to the (r0

, c0

)-regularity con- 20

dition used in Audibert & Tsybakov (2007).

Page 17: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

2 J. LEI

2. SUP-NORM ERROR BOUND FOR LOCAL POLYNOMIAL ESTIMATOR

THEOREM 1. Assume that ⌘ 2 ⌃(�, L), and that K is a valid kernel function of order �.Let ⌘ be the order b�c local polynomial estimator using kernel function K and bandwidth ⌧ . Ifthe marginal density function pX of X is uniformly bounded and bounded away from zero onX = [�1, 1]d, then for any r > 0, there exists a constant c such that

pr

"

sup

x|⌘(x)� ⌘(x)| c

(

log n

n⌧d

1/2

+ ⌧�

)#

� 1� n�r.

Proof. Let U(z) = (zs)s:|s|` for all z 2 Rd, where ` = b�c. Let M be the length of U(z).The local polynomial estimator can be written as

⌘(x) = UT(0)H�1

nxAnxY,25

where

Hnx(s, s0) =

1

n⌧d

nX

i=1

Xi � x

◆s+s0

K

Xi � x

,

Anx(s, i) =1

n⌧d

Xi � x

◆s

K

Xi � x

,

Y =(Y1

, ..., Yn)T .

By the reproducing property of local polynomial estimators, if Qn = {q(X1

), ..., q(Xn)}Twith q an order ` polynomial, then we have

UT(0)H�1

nxAnxQn = q(x).

Then we have the following bias-variance decomposition of the estimation error:30

⌘(x)� ⌘(x) = UT(0)H�1

nxAnx{Y � ⌘(x)en}= UT

(0)H�1

nxAnx{Y � ⌘n + ⌘n � ⌘nx + ⌘nx � ⌘(x)en}= UT

(0)H�1

nxAnx(⇠n +Rnx),

where en is a n⇥ 1 column vector of 1’s, and ⌘n, ⌘nx, ⇠n, Rnx are vectors such that

⌘n(i) = ⌘(Xi), ⌘nx(i) = ⌘x(Xi), ⇠n = Y � ⌘n, Rnx = ⌘n � ⌘nx,

and ⌘x(·) is the local polynomial approximation for ⌘(·) at x. By the Holder assumption,|Rnx(i)| L⌧� whenever K{(Xi � x)/⌧} 6= 0. In the last equation we used the reproducing35

property of the local polynomial estimator. The remainder of the proof consists of three mainsteps.

In the first step, we provide a uniform lower bound on the smallest eigenvalue of Hnx. Let�H be the smallest eigenvalue of matrix H . Then using Equation 6.3 in Audibert & Tsybakov(2007), there exist constants c > 0 and µ

0

> 0, such that

pr(�Hnx

2µ0

) 2M2

exp(�cn⌧d)

for all x, and all n large enough, n⌧d large enough.

Page 18: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

Classification with Confidence 3

Using continuity and differentiation, we can find some constant depending on � and K only,such that for all s, s0 satisfying |s|, |s0| ` and all X , 40

X � x

◆s+s0

K

X � x

�✓

X � x0

◆s+s0

K

X � x0

⌧�1kx� x0k1, (3)

which implies that

kHnx �Hnx0k2

kHnx �Hnx0kF M⌧�(d+1)kx� x0k1. (4)

Given � > 0, there exists a finite subset {x1

, ..., xN�

} ⇢ [0, 1]d that covers [�1, 1]d with radius� in `1 norm with N� 2

d��d. Now let � = µ0

⌧d+1/M where is the constant in (3) and (4).Then for any x 2 [0, 1]d, there exists a j such that kHnx �Hnx

j

k2

µ0

and hence for n largeenough 45

pr

inf

x�H

nx

µ0

pr

there exists 1 j N� : �Hnx

j

2µ0

(�/2)�dexp(�cn⌧d)

c0 expn

�cn⌧d � d(d+ 1) log ⌧o

c0 exp(�cn⌧d/2). (5)

The second step is to control kAnx⇠nk2. Let

anx(s) =1

n⌧d

nX

i=1

Xi � x

◆s

K

Xi � x

⇠n(i).

Recall that {X1

, ⇠n(1)}, ..., {Xn, ⇠n(n)} is an independent and identically distributed sample.Let fs,x(X, ⇠) = ⌧ {(X � x)/⌧}sK{(X � x)/⌧}⇠. Then |fs,x(X, ⇠)� fs,x0

(X, ⇠)| kx� 50

x0k1, by smoothness of K, where depends only on � and K. As a result, for any � > 0,there exists a �-covering set, with cardinality at most (2/�)d, for the function class F = {fx,s :x 2 [0, 1]d} in L

2

(P ) norm for any probability measure P on [�1, 1]d ⇥ [�1, 1]. We also have|fs,x| ⌧ , E(fs,x) = 0, and var(fs,x) c⌧d+2 for some constant c depending on the distribu-tion of X only. 55

The function class F indexed by x satisfies the conditions of Theorem 2.1 and Corollary 2.2 inGine & Guillou (2002), which give sharp tail probability bounds for the sup-norm of empiricalprocesses. These results are consequences of powerful exponential concentration inequalities dueto Talagrand (1994, 1996).

As a result, there exist constants c1

, c2

, c3

depending only on , d, such that for all c � c1

, we 60

have

pr

(

sup

x

1

n⌧d

nX

i=1

Xi � x

◆s

K

Xi � x

⇠n(i)

� c

log n

n⌧d

1/2)

c2

n�c3

c . (6)

Thus with probability at least 1� c2

Mn�c3

c, we have

kAnx⇠nk2 c

M log n

n⌧d

1/2

. (7)

Page 19: Classification with Confidencejinglei/conf_class_R2.pdf · Classification with Confidence 3 When t1 >t0, the solution to (2) is not unique, and the additional part C 0c is included

4 J. LEI

The third step is to control kAnxRnxk2. Consider the sth coordinate of AnxRnx

|(AnxRnx)(s)| =

1

n⌧d

nX

i=1

Xi � x

◆s

K

Xi � x

Rnx(i)

LkKk1⌧�1

n⌧d

nX

i=1

1I(|Xi � x| < ⌧),65

where 1I(·) is the indicator function. Because the density of X is bounded by µ < 1, we have

sup

xE {1I(|X � x| ⌧)} (2⌧)dµ .

On the other hand, the function class F 0= {1I(| ·�x| < ⌧) : x 2 [0, 1]d} also satisfies the

sup-norm tail bound conditions mentioned above. Therefore, there exist constants c1

, c2

, and c3

such that when (n⌧d/ log n)1/2 � c1

,

pr

(

sup

x

1

n⌧d

nX

i=1

1I(|Xi � x| < ⌧) � (µ+ 1)

)

c2

n�c

3

n⌧

d

logn

1/2

. (8)

As a result, with probability at least 1� c2

n�c3

(n⌧d/ logn)1/2 we have70

kAnxRnxk2 LkKk1M1/2(µ+ 1)⌧� . (9)

Finally, combining (5), (7) and (9), for any given r > 0 there exists constant c large enoughsuch that with probability at least 1� n�r

sup

x|⌘(x)� ⌘(x)| c

(

log n

n⌧d

1/2

+ ⌧�

)

,

as claimed in Theorem 1. ⇤

REFERENCES

AUDIBERT, J.-Y. & TSYBAKOV, A. B. (2007). Fast learning rates for plug-in classifiers. The Annals of Statistics 35,608–633.

GINE, E. & GUILLOU, A. (2002). Rates of strong uniform consistency for multivariate kernel density estimators.75

Annales de l’Institut Henri Poincare (B) Probability and Statistics 38, 907–921.TALAGRAND, M. (1994). Sharper bounds for Gaussian and empirical processes. The Annals of Probability 22,

28–76.TALAGRAND, M. (1996). New concentration inequalities in product spaces. Inventiones Mathematicae 126, 505–

563.80

TSYBAKOV, A. B. (2009). Introduction to Nonparametric Estimation. New York: Springer.