Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2014 Jan 1.
Published in final edited form as: J Comput Graph Stat. 2013;22(2):10.1080/10618600.2012.680866. doi: 10.1080/10618600.2012.680866

Adaptively Weighted Large Margin Classifiers

Yichao Wu 1, Yufeng Liu 2,✉
PMCID: PMC3867158  NIHMSID: NIHMS398587  PMID: 24363545

Abstract

Large margin classifiers have been shown to be very useful in many applications. The Support Vector Machine is a canonical example of large margin classifiers. Despite their flexibility and ability in handling high dimensional data, many large margin classifiers have serious drawbacks when the data are noisy, especially when there are outliers in the data. In this paper, we propose a new weighted large margin classification technique. The weights are chosen adaptively with data. The proposed classifiers are shown to be robust to outliers and thus are able to produce more accurate classification results.

Key Words and Phrases: Binary classification, data adaptive learning, large margin, multicategory classification, SVM, weighted learning

1 Introduction

Classification is a very useful statistical means for information extraction from data. As a supervised learning technique, the goal of classification is to construct a classification rule based on a training set where both covariates and class labels are given. Once obtained, the classification rule can then be used for class prediction of new objects whose covariates are available. It can be understood as a special form of regression with the response variable being categorical. When the response variable is binary, the learning problem is known as binary classification. If there are more than two classes, we have multicategory classification.

There are a large number of methods for classification in the literature. Examples include Fisher Linear Discrimination Analysis, logistic regression, k-nearest neighbor, decision trees, neural networks, boosting, and many others. See Hastie et al. (2001) for more comprehensive reviews of various classification methods. Among numerous classification techniques, margin-based classifiers have attracted tremendous attentions in recent years due to their competitive performance and ability in handling high dimensional data. The Support Vector Machine (SVM) is one of the most well known large margin classifiers. Since its introduction, the SVM has gained much popularity in both machine learning and statistics. The seminal work by Vapnik (1995, 1998) has laid the foundation for the general statistical learning theory of the SVM, which furthermore inspired various extensions of the SVM. For other references on the binary SVM, see Cristianini and Shawe-Taylor (2000); Schölkopf and Smola (2002), and references therein. Besides the SVM, there are a number of other large margin classifiers introduced in the literature. Examples include the Penalized Logistic Regression (PLR) (Wahba, 1998; Lin et al., 2000; Zhu and Hastie, 2005), ψ-learning (Shen et al., 2003; Liu and Shen, 2006), the robust SVM (Wu and Liu, 2007), Distance-Weighted Discrimination (DWD) (Marron et al., 2007), and so on.

Despite progress on large margin classifiers, there are still drawbacks in certain situations. For example, when the data are noisy with possible outliers in the data, techniques such as the SVM may be affected. In particular, when there exist points far from their own classes, the SVM solution can be potentially pulled towards these outlying points due to the unbounded hinge loss function. To achieve robustness, Shen et al. (2003) proposed ψ-learning and Wu and Liu (2007) further extended ψ-learning to the robust SVM. Although these methods can yield more accurate classifiers than the original SVM when the data are noisy, the corresponding optimization problem is nonconvex and the computation can be much more difficult than that of the SVM.

In this article, we propose a different approach to gain robustness. Instead of tackling a nonconvex loss function as in ψ-learning and the RSVM, we consider weighted learning to achieve more accurate classifiers. In particular, we would like to use larger weights for points closer to the boundaries and smaller weights for points farther away. The impact of outliers will be reduced using smaller weights. As a result, the weighted classifiers can deliver better classification performance than the unweighted ones. For the choice of weights, we utilize the results of original unweighted classifiers to determine the relative locations of points to the decision boundary. The weighted classifiers will be able to refine the classification boundaries with robustness to outliers. Our focus in this paper is on the SVM. However, the idea of weighting and adaptive learning is applicable to general large margin classifiers, such as those considered in Zou et al. (2008).

We propose two different weighted SVMs in this paper, the one-step weighted SVM (OWSVM) and the iteratively weighted SVM (IWSVM).We show that both methods yield more accurate classifiers than the original SVM when the data are noisy. The OWSVM only uses one-step weighting and thus is more computationally efficient than the IWSVM, which requires iteration. Furthermore, we demonstrate that the IWSVM has a close relationship with the RSVM proposed by Wu and Liu (2007). In particular, the IWSVM is equivalent to the difference convex algorithm (DCA) of the RSVM as used in Wu and Liu (2007) in a certain sense (as developed in Section 3) and consequently, the IWSVM can be viewed as a different way of implementing the RSVM.

The rest of this article is organized as follows. We briefly review the SVM and then introduce its weighted extension in Section 2. The OWSVM is proposed. Section 3 introduces the IWSVM and discusses its connection with the RSVM. The extension to the multicategory case is given in Section 4. Both simulated and real data examples are used to demonstrate the performance of the proposed methods in Section 5. Some discussion is provided in Section 6. The appendix contains the proof of the theorem.

2 Binary SVM and Its Weighted Extension

For a classification problem, we are given a training sample {(xi, yi) : i = 1, 2,⋯, n} which is distributed according to some unknown probability distribution function P(x; y). Here, xi ∈ 𝒮 ⊂ ℜd and yi denote the input vector and output label respectively, where n is the sample size, and d is the dimensionality of the input space. In this section, we first review the method of SVM and then introduce the weighted SVM (WSVM).

2.1 The Standard Binary SVM

For illustration, we first briefly describe the linear binary SVM. Let y ∈ {±1} and f (x) = βT x + β0. The standard SVM aims to find f (x) so that ŷ = sign (f(x)) can be used for prediction. In particular, for a separable problem, SVM solves the following optimization problem:

maxβ,β02∥β∥2 (1)
subject to yif(xi)≥1,∀i.

In (1), the quantity 2∥β∥2, known as the geometric margin, measures the separation between the two classes using the Euclidean distance. The term y f (x) reflects the correctness and strength of classification of f on x and is called the functional margin.

For a general problem in which (1) may not have any feasible solutions, slack variables ξi’s are used to measure the amount of violation of the constraints in problem (1). As a result, the corresponding optimization becomes

minβ,β012∥β∥22+C∑i=1nξi (2)
subject to yif(xi)≥1−ξi,ξi≥0,∀i,

where C > 0 is a tuning parameter.

Optimization formulation in (2) is also known as the primal problem of SVM. Using the Lagrange multipliers, (2) can be converted into an equivalent dual problem as follows:

maxα∑i=1nαi−12∑i,j=1nyiyjαiαj〈xi,xj〉, (3)
subject to  ∑i=1nyiαi=0;0≤αi≤C,∀i,

where 〈·, ·〉 denotes the inner product operator. Once the solution of problem (3) is obtained, β̂ can be calculated as ∑i=1nyiα^ixi and the intercept β̂0 can be computed using the Karush-Kuhn-Tucker (KKT) complementarity conditions of the optimization theory. Here we use the hat notations to denote the corresponding optimizer. If nonlinear learning is needed, one can apply the kernel trick by replacing the inner product 〈xi, xj〉 by K(xi, xj), where the kernel K(·, ·) is a non-negative definite function. This amounts to applying linear learning in the feature space induced by kernel K(·, ·) to achieve nonlinear learning in the original input space. One example is the Gaussian kernel K(x1, x2) = exp(− ∥ x1 − x2∥2/ σ2) for some data width parameter σ > 0. More details about the SVM can be found in Cristianini and Shawe-Taylor (2000).

From problem (3), we can see that among the n training points, only points with αi > 0 will make an impact on the SVM classifier, namely the SVs. It can be shown that these points satisfy that yi f (xi) ≤ 1. Consequently, outliers that are far from their own classes will be included as SVs and influence the classifier. Our main contribution in this paper is to reduce the impact of outliers via weighting and deliver more robust classifiers.

It can be shown that the SVM classifier can be fit in the general regularization frame-work as follows

minfJ(f)+C∑i=1nH1(yif(xi)). (4)

Problem (4) is equivalent to problem (2) with the L2 penalty J(f)=12∥β∥22 and the hinge loss H1 (u) = (1 − u)+, where (u)+ = u if u ≥ 0 and 0 otherwise.

2.2 Weighted SVM

In weighted learning, we assume that there is a nonnegative weight wi associated with each pair of observations (xi, yi) for i = 1, 2, ⋯, n. The proposed weighted SVM solves the following optimization problem

minf∈ℱJ(f)+C∑i=1nwiH1(yif(xi)) (5)

to estimate a function f(·) whose sign gives a classification rule. When wi = 1, it reduces to the standard SVM.

When linear learning is considered, the corresponding dual problem becomes

minα12∑i=1n∑j=1nαiαjyiyj〈xi,xj〉−∑i=1nαi, (6)
subject to∑i=1nαiyi=0,0≤αi≤Cwi,i=1,2,⋯,n.

Note that the above dual problem is still a quadratic programming problem. The only difference from the standard SVM problem in (3) is that the upper bound for αi is changed to Cwi in the constraint. Once (6) is solved, solution of the weighted linear SVM (5) can be recovered using β^=∑i=1nα^iyixi and β^0=ym−xmTβ^ for any m such that 0 < α̂m < Cwm. Any observation (xi, yi) with 0 < α̂i ≤ Cwi is called a support vector (SV). Classifier function f(·) is estimated by f̂ (x) = β̂0 + xT β̂.

Nonlinear learning is typically achieved using the kernel trick. Let K(·, ·) be a bivariate kernel. Due to the kernel representer theorem, nonlinear classifier function f(x) can be represented as c0+∑i=1nK(x,xi)ci. The involved parameter c0, c1, ⋯, cn can be estimated by solving

minc0,c1,⋯,cnC∑i=1nwiH1(yi(c0+∑j=1nK(xi,xj)cj))+12∑i=1n∑j=1nciK(xi,xj)cj.

The corresponding dual problem is

maxα1,α2,⋯,αn∑i=1nαi−12∑i=1n∑j=1nαiαjyiyjK(xi,xj)
subject to∑i=1nαiyi=00≤αi≤Cwi, i=1…,n.

Denote the optimizer of the dual problem by α̂i, i = 1, 2, ⋯, n. Function f(·) is estimated by f^(x)=c^0+∑i=1nα^iyiK(xi,x), where ĉ0 is given by ym−∑i=1nα^iyiK(xi,xm) for any m satisfying 0 < α̂m < Cwm.

2.3 Choice of Weights

The standard SVM uses the same weight wi = 1 for all pairs of observation. However when there are outliers, it is desirable to give smaller weights to observations that are outliers. One natural approach for weighting is to make use of the results from standard learning to understand relative locations of the training data points to the classification boundary. To that end, we first train the standard SVM with weight wi = 1 in (5) using a properly tuned regularization parameter C. Denote the optimal solution as f̂SVM(·). Next we define weight as wi = 1/(1+| f̂SVM(xi)|) for i = 1, 2, ⋯ n and train the weighted SVM (5) using this weight.

Our motivation of the weight function comes from the form of the hinge loss function. When u ≤ 0, the hinge loss H1(u) is (1 + |u|). To connect with the 0–1 loss I(u ≤ 0), we consider the weight form 1/(1+|u|). With the standard learning solution f̂SVM, we use the weight wi = 1/(1 + | f̂SVM(xi)|) for the i-th point. The weight function is shown in Figure 1. Note that our proposed weighting scheme assigns a smaller weight for any observation (xi, yi) with a larger |f̂SVM (xi)|. This matches our goal. In particular, for any observation (xi, yi), it is misclassified if yi f̂SVM(xi) < 0. In this case, the smaller yi f̂SVM (xi) is, the more likely for (xi, yi) to be an outlier, as it would indicate that it is far away from its own class. Our weight function will assign smaller weights for such observations in the weighted learning. On the other hand, the observation (xi, yi) is correctly classified if yi f̂SVM(xi) > 0. When yi f̂SVM(xi) > 1, the corresponding Lagrangian multiplier optimizer α̂i is equal to zero and consequently does not contribute to the solution due to its solution representation. Thus, an observation (xi, yi) with a large positive yi f̂SVM(xi) will not affect the solution much and will be assigned a small weight. To further understand the weight function, we display the function w(u)H1(u) = max{0, 1 − u}=(1 + |u|) in Figure 1, which can be viewed as the target loss through our weighted learning. Note that w(u) H1(u) is same as the 0–1 loss except the region of [0,1]. The 0–1 loss has a discontinuous jump at 0 while w(u) H1(u) is a continuous function.

Figure 1.

Figure 1

Plot of the hinge loss H1, the weight functions for the OWSVM, and the product function w(u)H1(u) for the binary case with k = 2.

This weighted SVM procedure involves two steps: the first step is to apply the standard learning to calculate the weights for all training data points, and the second step is to apply the weighted learning. We call this procedure the one-step weighted SVM (OWSVM). As we will show in our numerical results, our proposed choice of weights works very well.

One natural question is whether one should continue to iterate the process after the proposed one-step weighted learning. We suggest not to iterate for this choice of weights. The main reason is that the choice of weights is defined based on the original hinge loss and it may not be reasonable anymore to weight using the OWSVM solution. Furthermore, there is no guarantee for convergence if we iterate. Consequently, we recommend this choice of weights for the one-step procedure OWSVM only. In Section 3, we consider another choice of weights and suggest an iterative procedure using the corresponding weights. We show some close connection of this iterative version of the WSVM with the DCA for the RSVM.

3 Connection of Binary RSVM with WSVM

To improve the SVM for noisy data, Wu and Liu (2007) proposed to truncate the hinge loss function and defined the truncated hinge loss Ts(u) = H1(u) − Hs(u), where Hs(u) = [s − u]+ for s ≤ 0. The truncated hinge loss function is non-convex and as a result, the corresponding optimization problem is much more challenging. Wu and Liu (2007) proposed to use the DCA to solve the corresponding optimization. They also recommended to use s = −1/(k − 1), where k denotes the number of classes. We will follow this recommendation for the rest of this paper. In this section, we show some connection between the RSVM and WSVM. In particular, we propose an alternative algorithm for the RSVM using the iterative WSVM (IWSVM) implementation. Since each step of the IWSVM is to solve one WSVM, the proposed IWSVM is much simpler to implement. Surprisingly, we show that the proposed IWSVM is equivalent to the DCA in some sense, as we will discuss further.

For further illustration, we note that the RSVM solves

minfJ(f)+C∑i=1nTs(yif(xi)). (7)

Note that the only difference between the standard SVM problem (4) and the RSVM problem (7) is the change of loss from H1 to Ts. To handle the nonconvexity of Ts, the DCA decomposes Ts as Ts = H1(u)− Hs(u), a difference of two convex functions. At each iteration with the given current solution, the DCA solves a convex minimization problem via keeping H1 as it is and replacing Hs by its linear approximation at the current solution. Note that the truncated hinge loss function is flat over (−∞, s) and (1, ∞). Due to the optimization theory, the optimizer of (7) does not depend on any observation falling inside either (−∞, s) or (1, ∞) (Wu and Liu, 2007).

Motivating from the RSVM, in this section, we propose an alternative algorithm, IWSVM, for (7) by iteratively updating the weights and solving the corresponding WSVM.

The IWSVM algorithm can be summarized as follows:

  • Step 1 (Initialization): Solve the WSVM problem (5) with weights wi = 1 for i = 1, 2,⋯, n and denote the optimal solution as f̂(0)(·).

  • Step 2 (Iteration): At the tth iteration with t ≥ 1, define weights as wi(t)=1 if s ≤ yi f̂(t−1) (xi) ≤ 1 and 0 otherwise for i = 1, 2, ⋯, n. Solve the WSVM (5) with the updated weights wi(t)’s and denote the corresponding optimizer as f̂(t)(·).

  • Step 3 (Convergence): Repeat Step 2 until convergence. We claim convergence when wi(t)=wi(t−1) for all i = 1, 2, ⋯, n.

Note that in Step 2, only observations with s ≤ yi f̂(t−1)(xi) ≤ 1 have a positive weight 1. Thus the essential size of the corresponding optimization problem (6) is much smaller than n and consequently it is much more efficient to solve the corresponding optimization problem.

As a remark, we note that both the DCA and the proposed IWSVM algorithm solve the RSVM optimization problem (7). Since the corresponding objective function of the RSVM problem (7) is non-convex, both algorithms can only guarantee local optimizers. As typically there are multiple local minimums, we generally cannot guarantee that these two algorithms always lead to the same local solution. However we can show their equivalence in terms of fixed points as stated in the following theorem. For an iterative algorithm such as the DCA and IWSVM, a solution is called a fixed point if it satisfies the convergence criterion and no further iteration is needed.

Theorem 1. The DCA and IWSVM algorithms are equivalent in terms of fixed points. Namely, the local solution of the DCA is a fixed point of the proposed IWSVM algorithm, and vice versa.

So far, we have proposed two weighted SVM algorithms, one is the one-step algorithm OWSVM and the other is the iterative algorithm IWSVM. As we have shown, the IWSVM can be viewed as an algorithm for the RSVM. To further illustrate these two algorithms, we plot both weight functions in Figure 2 for further comparison. Note that the weight for the IWSVM is a step function with value 1 in the interval [s, 1] and 0 elsewhere. In contrast, the weight for the OWSVM is a smooth concave function on both positive and negative sides of the horizontal axis. Another important difference between the two algorithms OWSVM and IWSVM is that the OWSVM algorithm is a one-step procedure and does not iterate. On the other hand, both the DCA and the proposed IWSVM algorithms for the RSVM involve iteration and thus require more computational time.

Figure 2.

Figure 2

Plot of the weight functions for the OWSVM and IWSVM for the binary case with k = 2.

4 Extensions to Multicategory Learning

So far, we have been focusing on binary classification. In practice, multicategory problems are very common. In this section, we extend the proposed two algorithms, OWSVM and IWSVM, to multicategory cases. For multicategory learning, the response is labeled as yi ∈ {1, 2, ⋯, k}, where k denotes the number of classes. The goal is to estimate a function vector f (x) = (f1 (x), f2 (x), ⋯, fk (x))T. The argmax rule argmaxj=1,2⋯,kfj(x) is used as the classification rule.

There are a number of multicategory SVM (MSVM) techniques proposed in the literature. To solve a multicategory problem using the SVM, typically there are two possible approaches. The first approach is to solve the multicategory problem via a sequence of binary problems, e.g., one-versus-rest and one-versus-one (Dietterich and Bakiri, 1995). The second approach is to generalize the binary SVM to a simultaneous multicategory formulation which deals with all classes at once (Vapnik, 1998; Weston and Watkins, 1999; Liu and Shen, 2006; Wang and Shen, 2007). Since the proposed binary weighted SVM can be directly applied for the first approach to solve multicategory problems, we will focus on the simultaneous multicategory formulation in this section. In particular, we use the MSVM proposed by Liu and Shen (2006) to illustrate the extensions of our proposed weighted SVM techniques for multicategory problems to gain robustness.

To handle multicategory classification, Liu and Shen (2006) proposed the generalized functional margin min g (f (xi), yi), where g (f (x), y) = {fy (x) − fj(x), j ≠ y}. Using the generalized functional margin, the 0–1 loss can be represented as I(min g (f(xi), yi) ≤ 0). Liu and Shen (2006) suggested to replace the indicator function of the 0–1 loss by the convex hinge loss function to yield the MSVM. If we use the weight wi for the i-th observation, we get the following weighted MSVM

minf12∑j=1kJ(fj)+C∑i=1nwiH1(ming(f(xi),yi)). (8)

We first consider the problem with given weights. For linear learning with fj(x) = β0j + xT βj, the dual problem of (8) is given by

minα12∑j=1k∥∑i:yi=j∑j′≠yiαij′xi−∑i:yi≠jαijxi∥2−∑i=1n∑j′≠yiαij′ (9)
subject to∑i:yi=j∑j′≠yiαij′−∑i:yi≠jαij=00≤∑j≠yiαij≤Cwiαij≥0,j≠yi;i=1,…,n.

Note that the weight wi shows up in the upper bound of Σ j≠yi αij as Cwi. The smaller the weight wi is, the smaller of the corresponding solution of αij will be. As a result, the impact of the i point will be reduced. Denote the optimizer by α̂ij. Estimates of the coefficients βj are given by β̂j = Σ i:yi=j Σ j′≠yi α̂ij′xi − Σ i:yi≠j α̂ijxi for j = 1, 2,⋯, k. Once β̂j’s are determined, we denote f˜j(xi)=xiTβ^j and estimate the intercepts by solving the following linear programming problem

minβ0j∑i=1nwiηi
subject toηi≥0,i=1,2,⋯,n,ηi≥1−(f˜yi(xi)+β0yi)+f˜j(xi)+β0j,i=1,2,⋯,n;j≠yi,∑j=1kβ0j=0.

Denote the optimizer by β̂0j. The estimated function is given by f̂j(x) = β̂0j + xT β̂j. The final classification rule is then given by argmaxj=1,2,⋯,kf^j(x).

When nonlinear learning is considered with kernel K(·, ·), the optimization is similar to the linear learning case with the objective function of the dual problem (9) replaced by the following objective function

∑i=1n∑j′≠yiαij′−12∑j=1k〈∑i:yi=j∑j′≠yiαij′Ki−∑i:yi≠jαijKi,∑i:yi=j∑j′≠yiαij′ei−∑i:yi≠jαijei〉, (10)

where ei = (0, ⋯, 0, 1, 0, ⋯, 0)T denotes the standard basis of the n-dimension space and Ki = (K(x1, xi), K (x2, xi), ⋯, K(xn, xi))T.

Next we consider the choice of weights for the weighted MSVM to gain robustness. Note that the standard MSVM uses weight wi = 1. To extend the OWSVM we proposed for the binary case, we consider wi = 1/(1+| min g (f̂SVM(xi), yi)|) for the i-th point, where f̂SVM is the solution from the standard MSVM. For the IWSVM, similar to the binary case, its extension to the multicategory case is also closely related to the robust truncated-hinge-loss MSVM (RMSVM). In particular, the RMSVM uses the truncated hinge loss HTs (·) for some s ∈ [−1/(k −1), 0]. Similar to the binary case, we extend the IWSVM algorithm using weighted learning to implement the RMSVM by iteratively updating weight wi and solving (8) with updated weights. The algorithm is summarized as follows:

  • Step 1 (Initialization): Initialize by solving the weighted MSVM (8) with weights wi = 1 for i = 1, 2, ⋯, n and denoting the estimated functions by f^j(0)(·).

  • Step 2 (Iteration): At the tth iteration, define weight as wi(t)=1 if s ≤ min {f̂yi (xi) − f̂j(xi)} ≤ 1 and 0 otherwise for i = 1, 2, ⋯, n. Solve the weighted MSVM (8) with the updated weights wi(t) and denote the updated estimated functions by f^j(t)(·).

  • Step 3 (Convergence): Repeat Step 2 until convergence.

Similarly to the binary case, we can establish close relationship between the DCA for the RMSVM and the proposed IWSVM as follows.

Corollary 1. The DCA and IWSVM algorithms are equivalent in terms of fixed points.

5 Numerical Examples

In this session, we use both simulated examples in Sections 5.1 and 5.2 and a real data example in Section 5.3 to demonstrate the performance of the proposed OWSVM and IWSVM. Throughout our simulation, the training data set is generated with a sample of size 100. Independent tuning and test data sets are generated in the same way as the training data with sizes 100 and 500000, respectively, to tune the regularization parameter and evaluate performance. The regularization parameter C is tuned via a grid search using the tuning data set. We compare the performance of the OWSVM and IWSVM with the standard SVM, RSVM (with loss function T−1/(k−1)(·), where k denotes the number of classes), and ψ-learning (with loss function T0(·)).

5.1 Linear Examples

We consider linear learning with a binary response or a three-class response. The two-dimension predictor X = (X1, X2)T is generated from the uniform distribution over the unit disc {(x1,x2):x12+x22≤1}.

For binary learning, conditional on X = x = (x1, x2)T, set ỹ = sign(x2). To show robustness, a random flipping step is followed to generate the binary response. Denote the percentage of flipping by perc. The binary response y is set as ỹ with probability 1 − perc and − ỹ with probability perc. The points whose labels are flipped are potential outliers.

For the three-class case, conditional on X = x = (x1, x2)T, denote θ to be the radian phase angle measured counterclockwise from the ray from (0, 0) to (1, 0) to another ray from (0, 0) to (x1, x2). In this case θ is valued inside interval [0, 2π). Set y˜=⌈3θ2π⌉ where ⌈·⌉ denotes the ceiling operator. The response y is set as ỹ with probability 1 − perc and as one of the two values in {1, 2, 3} \ {ỹ}, each with probability perc/2, where \ denotes the set minus operator.

Four different flipping percentages are considered with perc = 5%, 10%, 15%, and 20%. Test errors over 100 repetitions are summarized using boxplots in Figures 3 and 4, respectively. From the plots, we can see that both OWSVM and IWSVM work better than the SVM. Between the OWSVM and IWSVM, the IWSVM works better than that of the OWSVM. Furthermore, the IWSVM and DCA of the RSVM behave very similarly and they are slightly better than the performance of ψ-learning. Note that the OWSVM involves a full iteration till convergence while the OWSVM only uses one-step weighting. Thus, there is a trade-off between accuracy and computational complexity between the OWSVM and IWSVM. To compare the computational time involved for different methods, we report the computation time using boxplots in Figures 5 and 6. Indeed, we can see from the boxplots that the IWSVM takes longer to compute than the OWSVM.

Figure 3.

Figure 3

Classification accuracy comparison among the SVM, OWSVM, IWSVM, RSVM, and ψ-learning (denoted by M1, M2, M3, M4, and M5, respectively) for the linear example of Section 5.1 with K = 2.

Figure 4.

Figure 4

Classification accuracy comparison among the SVM, OWSVM, IWSVM, RSVM, and ψ-learning (denoted by M1, M2, M3, M4, and M5, respectively) for the linear example of Section 5.1 with K = 3.

Figure 5.

Figure 5

Computational time comparison among the SVM, OWSVM, IWSVM, RSVM, and ψ-learning (denoted by M1, M2, M3, M4, and M5, respectively) for the linear example of Section 5.1 with K = 2.

Figure 6.

Figure 6

Computational time comparison among the SVM, OWSVM, IWSVM, RSVM, and ψ-learning (denoted by M1, M2, M3, M4, and M5, respectively) for the linear example of Section 5.1 with K = 3.

So far the dimension of our examples is only two. Next we consider a higher dimensional example with 10 predictors. The predictors X = (X1, X2, ⋯, X10)T is uniformly distributed over the set {(x1,x2,⋯,x10):∑j=110|xj|≤1}. The response is binary and generated in two steps similarly as the previous example. Conditional X = x = (x1, x2, ⋯ x10)T, we first set ỹ = 1 if y˜=1 if ∑j=110xj>0 and 2otherwise. Then a random flipping with perc = 5% is applied to ỹ to get the binary response y. The simulation results in terms of classification accuracy and computational time are summarized in Figure 7. A similar pattern is observed.

Figure 7.

Figure 7

Classification accuracy (left) and computational time (right) comparison among the SVM, OWSVM, IWSVM, RSVM, and ψ-learning (denoted by M1, M2, M3, M4, and M5, respectively) for the linear example of Section 5.1 with d = 10.

5.2 Nonlinear example

For the nonlinear learning, we consider a three-class example. The data generation scheme is similar to that of the linear examples. First, the two-dimensional predictor X is generated from the uniform distribution over the unit disc. Conditional on X = x, denote θ to be the radian phase angle measured counterclockwise from the ray from (0, 0) to (1, 0) to another ray from (0, 0) to (x1, x2). Set ỹ = 1 if θ ∈ [0, π/3) or [π, 4π/3); ỹ = 2 if θ ∈ [π/3, π); ỹ = 3 if θ ∈ [4π/3, 2π). The response y is set as ỹ with probability 1 − perc and as one of the two values in {1, 2, 3} \ {ỹ}, each with probability perc/2.

To save space, we only consider two different flipping percentages perc = 15% and 20%. Test errors and computational time over 100 repetitions are reported in Figure 8. We can see that the improvement of the OWSVM and IWSVM over the SVM is less in terms of test errors compared to the linear examples. One potential reason is that the nonlinear kernel learning increases flexibility of the function. Consequently there are not many observations with functional margin min g (f(x), y) being very small. Thus, the effect of weighting can be smaller than that of the linear learning case.

Figure 8.

Figure 8

Classification accuracy (top two panels) and computational time (bottom two panels) comparisons among the SVM, OWSVM, IWSVM, RSVM, and ψ-learning (denoted by M1, M2, M3, M4, and M5, respectively) for the nonlinear example of Section 5.2 with K = 3.

5.3 Wisconsin Breast Cancer Data

In this section, we apply the proposed methods to the Wisconsin Diagnostic Breast Cancer (WDBC) data. The goal of this breast cancer study is to use a digitized image of a fine needle aspirate of a breast mass to diagnose the corresponding breast cancer status. More details on the data are provided at the UCI Machine Learning Repository (http://www.ics.uci.edu/~mlearn/MLRepository.html). The WDBC dataset has 569 subjects. It has a binary response of diagnosis as either malignant or benign. Furthermore, there are 30 real-valued input features available for each subject. We first preprocess the data by standardizing each input feature to have mean zero and standard deviation one. On each repetition, we randomly split the whole dataset into training, tuning, and test sets of sizes 150,150, and 269, respectively. We report the average testing error over the test set across 100 random repetitions. For each repetition, to study robustness of different methods to outliers, we apply random flipping to the training set as in Wu and Liu (2007). We consider three different levels of flipping 0%, 5%, and 10%.

For the analysis, linear learning is applied on this dataset and the results are summarized in Table 1. From the table, we can see that when there is no data contamination, all five methods perform similarly. As the percentage of data contamination increases, the SVM performs much worse than other methods. In particular, the IWSVM delivers better performance than the OWSVM when there are outliers with more computational time. This is consistent with the simulation results.

Table 1.

Classification accuracy of the SVM, OWSVM, IWSVM, RSVM, and ψ-learning on the WDBC data. The average test errors over 100 replications and the corresponding standard errors in parenthesis are reported in the table.

0% 5% 10%
SVM 0.0382(0.0013) 0.0438(0.0014) 0.0521(0.0017)
OWSVM 0.0377(0.0013) 0.0401(0.0016) 0.0444(0.0018)
IWSVM 0.0381(0.0014) 0.0377(0.0015) 0.0413(0.0016)
RSVM 0.0381(0.0014) 0.0377(0.0015) 0.0413(0.0016)
Psi 0.0380(0.0013) 0.0379(0.0015) 0.0406(0.0016)

6 Conclusion

In this article, we propose two different weighted extensions of the SVM, the OWSVM and IWSVM, to gain robustness for classification of noisy data. We show through numerical examples that both methods are effective in providing more accurate classification results than the standard SVM. Both binary and multicategory problems are considered. We also show the interesting connection of the IWSVW with the RSVM, which further justifies the robustness of the IWSVM. Numerical examples indicate that the IWSVM performs better than the OWSVM and costs more computational time. In general, we recommend the IWSVM if the computational time is not a concern. Although our focus in this paper is on the SVM, the idea can be directly generalized to other large margin classifiers. Further development and comparisons are necessary. Moreover, it will be interesting to extend the methods to other classification settings such as longitudinal or functional data as discussed in Müller (2005).

Supplementary Material

Appendix

Acknowledgment

The authors would like to thank Professor Richard A. Levine, the associate editor, and two referees for their constructive comments and suggestions that led to significant improvement of the article. The authors are partially supported by NSF Grants DMS-0747575 (Liu), DMS-0905561 (Wu), and DMS-1055210 (Wu), NIH/NCI Grants R01 CA-149569 (Liu and Wu) and P01 CA142538 (Liu).

Footnotes

Supplementary materials

The Supplementary files for this article include a zip file (WSVMcodes.zip) of Matlab codes used in Section 5 and the Appendix which gives the proof of Theorem 1.

Contributor Information

Yichao Wu, Department of Statistics, Temple University, Philadelphia, PA 19122 (yichao.wu@temple.edu).

Yufeng Liu, Department of Statistics and Operations Research, Carolina Center for Genome Sciences, University of North Carolina, Chapel Hill, NC 27599 (yfliu@email.unc.edu).

References

  1. Cristianini N, Shawe-Taylor J. An introduction to support vector machines and other kernel-based learning methods. Cambridge University Press; 2000. [Google Scholar]
  2. Dietterich TG, Bakiri G. Solving multiclass learning problems via error-correcting output codes. Journal of Artificial Intelligence Research. 1995;2:263–286. [Google Scholar]
  3. Hastie T, Tibshirani R, Friedman J. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. New York: Springer-Verlag; 2001. [Google Scholar]
  4. Lin X, Wahba G, Xiang D, Gao F, Klein R, Klein B. Smoothing Spline ANOVA Models for Large Data Sets With Bernoulli Observations and the Randomized GACV. The Annals of Statistics. 2000;28:1570–1600. [Google Scholar]
  5. Liu Y, Shen X. Multicategory ψ-learning. Journal of the American Statistical Association. 2006;101:500–509. [Google Scholar]
  6. Marron JS, Todd M, Ahn J. Distance weighted discrimination. Journal of the American Statistical Association. 2007;102:1267–1271. doi: 10.1198/jasa.2010.tm08487. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Müller H-G. Functional Modelling and Classification of Longitudinal Data. Scandinavian Journal of Statistics. 2005;32:223–240. [Google Scholar]
  8. Schölkopf B, Smola AJ. Learning with kernels. MIT Press; 2002. [Google Scholar]
  9. Shen X, Tseng GC, Zhang X, Wong WH. On ψ-learning. Journal of the American Statistical Association. 2003;98:724–734. [Google Scholar]
  10. Vapnik V. The Nature of Statistical Learning Theory. New York: Springer; 1995. [Google Scholar]
  11. Vapnik V. Statistical Learning Theory. Wiley: 1998. [DOI] [PubMed] [Google Scholar]
  12. Wahba G. Support vector machines, reproducing kernel Hilbert spaces, and randomized GACV. In: Schölkopf B, Burges CJC, Smola AJ, editors. Advances in Kernel Methods: Support Vector Learning. MIT Press; 1998. pp. 125–143. [Google Scholar]
  13. Wang L, Shen X. On L1-Norm Multiclass Support Vector Machines: Methodology and Theory. Journal of the American Statistical Association. 2007;102:583–594. [Google Scholar]
  14. Weston J, Watkins C. Support vector machines for multi-class pattern recognition. In: Verleysen, Bruges M, editors. Proceedings of the 7th European Symposium on Artificial Neural Networks (ESANN-99) Belgium: 1999. pp. 219–224. [Google Scholar]
  15. Wu Y, Liu Y. Robust truncated-hinge-loss support vector machines. Journal of the American Statistical Association. 2007;102:974–983. [Google Scholar]
  16. Zhu J, Hastie T. Kernel Logistic Regression and the Import Vector Machine. Journal of Computational and Graphical Statistics. 2005;14:185–205. [Google Scholar]
  17. Zou H, Zhu J, Hastie T. New Multicategory Boosting Algorithms Based on Multicategory Fisher-Consistent Losses. Annals of Applied Statistics. 2008;2:1290–13061. doi: 10.1214/08-AOAS198. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Appendix

RESOURCES