Skip to main content
PLOS One logoLink to PLOS One
. 2018 Jan 18;13(1):e0191186. doi: 10.1371/journal.pone.0191186

Sequential linear regression with online standardized data

Kévin Duarte 1,2,3,*, Jean-Marie Monnez 1,2,3,4, Eliane Albuisson 1,5,6
Editor: Chenping Hou7
PMCID: PMC5773231  PMID: 29346392

Abstract

The present study addresses the problem of sequential least square multidimensional linear regression, particularly in the case of a data stream, using a stochastic approximation process. To avoid the phenomenon of numerical explosion which can be encountered and to reduce the computing time in order to take into account a maximum of arriving data, we propose using a process with online standardized data instead of raw data and the use of several observations per step or all observations until the current step. Herein, we define and study the almost sure convergence of three processes with online standardized data: a classical process with a variable step-size and use of a varying number of observations per step, an averaged process with a constant step-size and use of a varying number of observations per step, and a process with a variable or constant step-size and use of all observations until the current step. Their convergence is obtained under more general assumptions than classical ones. These processes are compared to classical processes on 11 datasets for a fixed total number of observations used and thereafter for a fixed processing time. Analyses indicate that the third-defined process typically yields the best results.

1 Introduction

In the present analysis, A′ denotes the transposed matrix of A while the abbreviation “a.s.” signifies almost surely.

Let R = (R1,…,Rp) and S = (S1,…,Sq) be random vectors in Rp and Rq respectively. Considering the least square multidimensional linear regression of S with respect to R: the (p, q) matrix θ and the (q, 1) matrix η are estimated such that E[‖SθRη2] is minimal.

Denote the covariance matrices

B=Covar[R]=E[(R-E[R])(R-E[R])],F=Covar[R,S]=E[(R-E[R])(S-E[S])].

If we assume B is positive definite, i.e. there is no affine relation between the components of R, then

θ=B-1F,η=E[S]-θE[R].

Note that, R1 denoting the random vector in Rp+1 such that R1=(R1), θ1 the (p + 1, q) matrix such that θ1=(θη), B1=E[R1R1] and F1 = E[R1 S′], we obtain θ1=B1-1F1.

In order to estimate θ (or θ1), a stochastic approximation process (Xn) in Rp×q (or R(p+1)×q) is recursively defined such that

Xn+1=Xn-an(BnXn-Fn),

where (an) is a sequence of positive real numbers, eventually constant, called step-sizes (or gains). Matrices Bn and Fn have the same dimensions as B and F, respectively. The convergence of (Xn) towards θ is studied under appropriate definitions and assumptions on Bn and Fn.

Suppose that ((R1n, Sn), n ≥ 1) is an i.i.d. sample of (R1, S). In the case where q = 1, Bn=R1nR1n and Fn=R1nSn, several studies have been devoted to this stochastic gradient process (see for example Monnez [1], Ljung [2] and references hereafter). In order to accelerate general stochastic approximation procedures, Polyak [3] and Polyak and Juditsky [4] introduced the averaging technique. In the case of linear regression, Györfi and Walk [5] studied an averaged stochastic approximation process with a constant step-size. With the same type of process, Bach and Moulines [6] proved that the optimal convergence rate is achieved without strong convexity assumption on the loss function.

However, this type of process may be subject to the risk of numerical explosion when components of R or S exhibit great variances and may have very high values. For datasets used as test sets by Bach and Moulines [6], all sample points whose norm of R is fivefold greater than the average norm are removed. Moreover, generally only one observation of (R, S) is introduced at each step of the process. This may be not convenient for a large amount of data generated by a data stream for example.

Two modifications of this type of process are thus proposed in this article.

The first change in order to avoid numerical explosion is the use of standardized, i.e. of zero mean and unit variance, components of R and S. In fact, the expectation and the variance of the components are usually unknown and will be estimated online.

The parameter θ can be computed from the standardized components as follows. Let σj the standard deviation of Rj for j = 1,…,p and σ1k the standard deviation of Sk for k = 1,…,q. Define the following matrices

Γ=(1σ1001σp),Γ1=(1σ11001σ1q).

Let Sc = Γ1(SE[S]) and Rc = Γ(RE[R]). The least square linear regression of Sc with respect to Rc is achieved by estimating the (p, q) matrix θc such that E[||Sc-θcRc||2] is minimal. Then θc = Γ−1(B−1 F1θ = B−1 F = Γθc1)−1.

The second change is to use, at each step of the process, several observations of (R, S) or an estimation of B and F computed recursively from all observations until the current step without storing them.

More precisely, the convergence of three processes with online standardized data is studied in sections 2, 3, 4 respectively.

First, in section 2, a process with a variable step-size an and use of several online standardized observations at each step is studied; note that the number of observations at each step may vary with n.

Secondly, in section 3, an averaged process with a constant step-size and use of a varying number of online standardized observations at each step is studied.

Thirdly, in section 4, a process with a constant or variable step-size and use of all online standardized observations until the current step to estimate B and F is studied.

These three processes are tested on several datasets when q = 1, S being a continuous or binary variable, and compared to existing processes in section 5. Note that when S is a binary variable, linear regression is equivalent to a linear discriminant analysis. It appears that the third-defined process most often yields the best results for the same number of observations used or for the same duration of computing time used.

These processes belong to the family of stochastic gradient processes and are adapted to data streams. Batch gradient and stochastic gradient methods are presented and compared in [7] and reviewed in [8], including noise reduction methods, like dynamic sample sizes methods, stochastic variance reduced gradient (also studied in [9]), second-order methods, ADAGRAD [10] and other methods. This work makes the following contributions to the variance reduction methods:

  • In [9], the authors proposed a modification of the classical stochastic gradient algorithm to reduce directly the gradient of the function to be optimized in order to obtain a faster convergence. It is proposed in this article to reduce this gradient by an online standardization of the data.

  • Gradient clipping [11] is another method to avoid a numerical explosion. The idea is to limit the norm of the gradient to a maximum number called threshold. This number must be chosen, a bad choice of threshold can affect the computing speed. Moreover it is then necessary to compare the norm of the gradient to this threshold at each step. In our approach the limitation of the gradient is implicitly obtained by online standardization of the data.

  • If the expectation and the variance of the components of R and S were known, standardization of these variables could be made directly and convergence of the processes obtained using existing theorems. But these moments are unknown in the case of a data stream and are estimated online in this study. Thus the assumptions of the theorems of almost sure (a.s.) convergence of the processes studied in sections 2 and 3 and the corresponding proofs are more general than the classical ones in the linear regression case [15].

  • The process defined in section 4 is not a classical batch method. Indeed in this type of method (gradient descent), the whole set of data is known a priori and is used at each step of the process. In the present study, new data are supposed to arrive at each step, as in a data stream, and are added to the preceding set of data, thus reducing by averaging the variance. This process can be considered as a dynamic batch method.

  • A suitable choice of step-size is often crucial for obtaining good performance of a stochastic gradient process. If the step-size is too small, the convergence will be slower. Conversely, if the step-size is too large, a numerical explosion may occur during the first iterations. Following [6], a very simple choice of the step-size is proposed for the methods with a constant step-size.

  • Another objective is to reduce computing time in order to take into account a maximum of data in the case of a data stream. It appears in the experiments that the use of all observations until the current step without storing them, several observations being introduced at each step, increases at best in general the convergence speed of the process. Moreover this can reduce the influence of outliers.

As a whole the major contributions of this work are to reduce gradient variance by online standardization of the data or use of a “dynamic” batch process, to avoid numerical explosions, to reduce computing time and consequently to better adapt the stochastic approximation processes used to the case of a data stream.

2 Convergence of a process with a variable step-size

Let (Bn, n ≥ 1) and (Fn, n ≥ 1) be two sequences of random matrices in Rp×p and Rp×q respectively. In this section, the convergence of the process (Xn, n ≥ 1) in Rp×q recursively defined by

Xn+1=Xn-an(BnXn-Fn)

and its application to sequential linear regression are studied.

2.1 Theorem

Let X1 be a random variable in Rp×q independent from the sequence of random variables ((Bn, Fn), n ≥ 1) in Rp×p×Rp×q.

Denote Tn the σ-field generated by X1 and (B1, F1),…,(Bn−1, Fn−1). X1, X2,…,Xn are Tn-measurable.

Let (an) be a sequence of positive numbers.

Make the following assumptions:

(H1a) There exists a positive definite symmetrical matrix B such that a.s.

1) n=1an||E[Bn|Tn]-B||<

2) n=1an2E[||Bn-B||2|Tn]<.

(H2a) There exists a matrix F such that a.s.

1)n=1an||E[Fn|Tn]-F||<

2) n=1an2E[||Fn-F||2|Tn]<.

(H3a) n=1an=,n=1an2<.

Theorem 1 Suppose H1a, H2a and H3a hold. Then Xn converges to θ = B−1 F a.s.

State the Robbins-Siegmund lemma [12] used in the proof.

Lemma 2 Let (Ω, A, P) be a probability space and (Tn) a non-decreasing sequence of sub-σ-fields of A. Suppose for all n, zn, αn, βn and γn are four integrable non-negative Tn-measurable random variables defined on (Ω, A, P) such that:

E[zn+1|Tn]zn(1+αn)+βn-γna.s.

Then, in the set {n=1αn<,n=1βn<}, (zn) converges to a finite random variable and n=1γn< a.s.

Proof of Theorem 1. The Frobenius norm ‖A‖ for a matrix A is used. Recall that, if ‖A2 denotes the spectral norm of A, ‖AB‖ ≤ ‖A2B‖.

Xn+1-θ=Xn-θ-an(BnXn-Fn)=(I-anB)(Xn-θ)-an((Bn-B)Xn-(Fn-F))

Denote Zn = (BnB)Xn − (FnF) = (BnB)(Xnθ) + (BnB)θ − (FnF) and Xn1=Xn-θ. Then:

Xn+11=(I-anB)Xn1-anZn||Xn+11||2=||(I-anB)Xn1||2-2an(I-anB)Xn1,Zn+an2||Zn||2.

Denote λ the smallest eigenvalue of B. As an → 0, we have for n sufficiently large

||I-anB||2=1-anλ<1.

Then, taking the conditional expectation with respect to Tn yields almost surely:

E[||Xn+11||2|Tn](1-anλ)2||Xn1||2+2an|(I-anB)Xn1,E[Zn|Tn]|+an2E[||Zn||2|Tn],E[Zn|Tn]=(E[Bn|Tn]-B)Xn1+(E[Bn|Tn]-B)θ-(E[Fn|Tn]-F).

Denoting

βn=||E[Bn|Tn]-B||,δn=||E[Fn|Tn]-F||,bn=E[||Bn-B||2|Tn],dn=E[||Fn-F||2|Tn],

we obtain, as ||Xn1||1+||Xn1||2:

|(I-anB)Xn1,E[Zn|Tn]|||Xn1||||E[Zn|Tn]||||Xn1||2(βn(1+||θ||)+δn)+βn||θ||+δn,E[||Zn||2|Tn]3bn||Xn1||2+3bn||θ||2+3dn,E[||Xn+11||2|Tn](1+an2λ2+2(1+||θ||)anβn+2anδn+3an2bn)||Xn1||2+2||θ||anβn+2anδn+3||θ||2an2bn+3an2dn-2anλ||Xn1||2.

Applying Robbins-Siegmund lemma under assumptions H1a, H2a and H3a implies that there exists a non-negative random variable T such that a.s.

||Xn1||T,n=1an||Xn1||2<.

As n=1an=, T = 0 a.s. ∎

A particular case with the following assumptions is now studied.

(H1a’) There exist a positive definite symmetrical matrix B and a positive real number b such that a.s.

1) for all n, E[Bn|Tn] = B

2) supn E[‖BnB2|Tn] < b.

(H2a’) There exist a matrix F and a positive real number d such that a.s.

1) for all n, E[Fn|Tn] = F

2) supn E[‖FnF2|Tn] < d.

(H3a’) Denoting λ the smallest eigenvalue of B,

(an=anα,a>0,12<α<1) or (an=an,a>12λ).

Theorem 3 Suppose H1a’, H2a’ and H3a’ hold. Then Xn converges to θ almost surely and in quadratic mean. Moreover lim¯1anE[||Xn-θ||2]<.

Proof of Theorem 3. In the proof of theorem 1, take βn = 0, δn = 0, bn < b, dn < d; then a.s.:

E[||Xn+11||2|Tn](1+λ2an2+3ban2)||Xn1||2+3(b||θ||2+d)an2-2anλ||Xn1||2.

Taking the mathematical expectation yields:

E[||Xn+11||2](1+(λ2+3b)an2)E[||Xn1||2]+3(b||θ||2+d)an2-2anλE[||Xn1||2].

By Robbins-Siegmund lemma:

t0:E[||Xn1||2]t;n=1anE[||Xn1||2]<.

As n=1an=, t = 0. Therefore, there exist NN and f > 0 such that for n > N:

E[||Xn+11||2](1-2anλ)E[||Xn1||2]+fan2.

Applying a lemma of Schmetterer [13] for an=anα with 12<α<1 yields:

lim¯nαE[||Xn1||2]<.

Applying a lemma of Venter [14] for an=an with a>12λ yields:

lim¯nE[||Xn1||2]<

2.2 Application to linear regression with online standardized data

Let (R1, S1),…,(Rn, Sn),… be an i.i.d. sample of a random vector (R, S) in Rp×Rq. Let Γ (respectively Γ1) be the diagonal matrix of order p (respectively q) of the inverses of the standard deviations of the components of R (respectively S).

Define the correlation matrices

B=ΓE[(R-E[R])(R-E[R])]Γ,F=ΓE[(R-E[R])(S-E[S])]Γ1.

Suppose that B−1 exists. Let θ = B−1 F.

Denote R¯n (respectively S¯n) the mean of the n-sample (R1, R2,…,Rn) of R (respectively (S1, S2,…,Sn) of S).

Denote (Vnj)2 the variance of the n-sample (R1j,R2j,...,Rnj) of the jth component Rj of R, and (Vn1k)2 the variance of the n-sample (S1k,S2k,...,Snk) of the kth component Sk of S.

Denote Γn (respectively Γn1) the diagonal matrix of order p (respectively q) whose element (j, j) (respectively (k, k)) is the inverse of nn-1Vnj (respectively nn-1Vn1k).

Let (mn, n ≥ 1) be a sequence of integers. Denote Mn=k=1nmk for n ≥ 1, M0 = 0 and In = {Mn−1+1,…,Mn}.

Define

Bn=ΓMn-11mnjIn(Rj-R¯Mn-1)(Rj-R¯Mn-1)ΓMn-1,Fn=ΓMn-11mnjIn(Rj-R¯Mn-1)(Sj-S¯Mn-1)ΓMn-11.

Define recursively the process (Xn, n ≥ 1) in Rp×q by

Xn+1=Xn-an(BnXn-Fn).

Corollary 4 Suppose there is no affine relation between the components of R and the moments of order 4 of (R, S) exist. Suppose moreover that assumption H3a” holds:

(H3a”) an>0,n=1ann<,n=1an2<.

Then Xn converges to θ a.s.

This process was tested on several datasets and some results are given in section 5 (process S11 for mn = 1 and S12 for mn = 10).

The following lemma is first proved.

Lemma 5 Suppose the moments of order 4 of R exist and an > 0, n=1ann<. Then n=1an||R¯Mn-1-E[R]||< and n=1an||ΓMn-1-Γ||< a.s.

Proof of Lemma 5. The usual Euclidean norm for vectors and the spectral norm for matrices are used in the proof.

Step 1:

Denote Var[R]=E[||R-E[R]||2]=j=1pVar[Rj].

E[||R¯Mn-1-E[R]||2]=j=1pVar[R¯Mn-1j]=j=1pVar[Rj]Mn-1Var[R]n-1.

Then:

n=1anE[||R¯Mn-1-E[R]||]Var[R]n=1ann-1<byH3a.

It follows that n=1an||R¯Mn-1-E[R]||< a.s.

Likewise n=1an||S¯Mn-1-E[S]||< a.s.

Step 2:

||ΓMn1Γ||=maxj=1,,p|1Mn1Mn11VMn1j1Var[Rj]|j=1p|Mn1Mn11VMn1jVar[Rj]|Mn1Mn11VMn1jVar[Rj]=j=1p|Mn1Mn11(VMn1j)2Var[Rj]|Mn1Mn11VMn1jVar[Rj](Mn1Mn11VMn1j+Var[Rj]).

Denote μ4j the centered moment of order 4 of Rj. We have:

E[|Mn-1Mn-1-1(VMn-1j)2-Var[Rj]|]Var[Mn-1Mn-1-1(VMn-1j)2]=O(μ4j-(Var[Rj])2Mn-1).

Then by H3a”, as Mn−1n−1:

n=1anj=1pE[|Mn-1Mn-1-1(VMn-1j)2-Var[Rj]|]<n=1anj=1p|Mn-1Mn-1-1(VMn-1j)2-Var[Rj]|<a.s.

As (VMn-1j)2Var[Rj] a.s., j = 1,…,p, this implies:

n=1an||ΓMn-1-Γ||<a.s.

Proof of Corollary 4.

Step 1: prove that assumption H1a1 of theorem 1 is verified.

Denote Rc = RE[R], Rjc=Rj-E[R], R¯jc=R¯j-E[R].

Bn=ΓMn-11mnjIn(Rjc-R¯Mn-1c)(Rjc-R¯Mn-1c)ΓMn-1=ΓMn-11mnjIn(RjcRjc-R¯Mn-1cRjc-Rjc(R¯Mn-1c)+R¯Mn-1c(R¯Mn-1c))ΓMn-1.B=ΓE[RcRc]Γ.

As ΓMn−1 and R¯Mn-1 are Tn-measurable and Rjc, jIn, is independent of Tn, with E[Rjc]=0:

E[Bn|Tn]-B=ΓMn-1(E[RcRc]+R¯Mn-1c(R¯Mn-1c))ΓMn-1-ΓE[RcRc]Γ=(ΓMn-1-Γ)E[RcRc]ΓMn-1+ΓE[RcRc](ΓMn-1-Γ)+ΓMn-1R¯Mn-1c(R¯Mn-1c)ΓMn-1a.s.

As ΓMn−1 and R¯Mn-1c converge respectively to Γ and 0 a.s. and by lemma 5, n=1an||ΓMn-1-Γ||< and n=1an||R¯Mn-1c||< a.s., it follows that n=1an||E[Bn|Tn]-B||< a.s.

Step 2: prove that assumption H1a2 of theorem 1 is verified.

BnB22ΓMn11mnjIn(RjcR¯Mn1c)(RjcR¯Mn1c)ΓMn12+2ΓE[RcRc]Γ22ΓMn141mnjInRjcR¯Mn1c4+2ΓE[RcRc]Γ22ΓMn141mnjIn23(Rjc4+R¯Mn1c4)+2ΓE[RcRc]Γ2.
E[||Bn-B||2|Tn]24||ΓMn-1||4(E[||Rc||4]+||R¯Mn-1c||4)+2||ΓE[RcRc]Γ||2a.s.

As ΓMn−1 and R¯Mn-1c converge respectively to Γ and 0 a.s., and n=1an2<, it follows that n=1an2E[||Bn-B||2|Tn]< a.s.

Step 3: the proofs of the verification of assumptions H2a1 and H2a2 of theorem 1 are similar to the previous ones, Bn and B being respectively replaced by

Fn=ΓMn-11mnjIn(Rjc-R¯Mn-1c)(Sjc-S¯Mn-1c)ΓMn-11,F=ΓE[RcSc]Γ1

3 Convergence of an averaged process with a constant step-size

In this section, the process (Xn, n ≥ 1) with a constant step-size a and the averaged process (Yn, n ≥ 1) in Rp×q are recursively defined by

Xn+1=Xn-a(BnXn-Fn)Yn+1=1n+1j=1n+1Xj=Yn-1n+1(Yn-Xn+1).

The a.s. convergence of (Yn, n ≥ 1) and its application to sequential linear regression are studied.

3.1 Lemma

Lemma 6 Let three real sequences (un), (vn) and (an), with un > 0 and an > 0 for all n, and a real positive number λ such that, for n ≥ 1,

un+1(1-anλ)un+anvn.

Suppose:

  • 1) vn → 0

  • 2) (an=a<1λ) or (an0,n=1an=).

  • Under assumptions 1 and 2, un → 0.

Proof of Lemma 6. In the case an depending on n, as an → 0, we can suppose without loss of generality that 1 − an λ > 0 for n ≥ 1. We have:

un+1i=1n(1-aiλ)u1+i=1nail=i+1n(1-alλ)vi,withn+1n=1.

Now, for n1n2n and 0 < ci < 1 with ci = ai λ for all i, we have:

i=n1n2cil=i+1n(1-cl)=i=n1n2(1-(1-ci))l=i+1n(1-cl)=i=n1n2(l=i+1n(1-cl)-l=in(1-cl))=l=n2+1n(1-cl)-l=n1n(1-cl)l=n2+1n(1-cl)1.

Let ϵ > 0. There exists N such that for i > N, |vi|<ϵ3λ. Then for nN, applying the previous inequality with ci = ai λ, n1 = 1, n2 = N, yields:

un+1i=1n(1-aiλ)u1+i=1Naiλl=i+1n(1-alλ)|vi|λ+ϵ3i=N+1naiλl=i+1n(1-alλ)i=1n(1-aiλ)u1+1λmax1iN|vi|l=N+1n(1-alλ)+ϵ3.

In the case an depending on n, ln(1 − ai λ) ∼ −ai λ as ai → 0(i → ∞); then, as n=1an=, l=N+1n(1-alλ)0(n).

In the case an = a, l=N+1n(1-aλ)=(1-aλ)n-N0(n) as 0 < 1 − aλ < 1.

Thus there exists N1 such that un+1 < ϵ for n > N1

3.2 Theorem

Make the following assumptions

(H1b) There exist a positive definite symmetrical matrix B in Rp×p and a positive real number b such that a.s.

1) limn → ∞(E[Bn|Tn] − B) = 0

2) n=11n(E[||E[Bn|Tn]-B||2])12<

3) supn E[‖BnB2|Tn] ≤ b.

(H2b) There exist a matrix F in Rp×q and a positive real number d such that a.s.

1) limn→∞(E[Fn|Tn] − F) = 0

2) supn E [‖FnF2|Tn] ≤ d.

(H3b) λ and λmax being respectively the smallest and the largest eigenvalue of B, 0<a<min(1λmax,2λλ2+b).

Theorem 7 Suppose H1b, H2b and H3b hold. Then Yn converges to θ = B−1 F a.s.

Remark 1 Györfi and Walk [5] proved that Yn converges to θ a.s. and in quadratic mean under the assumptions E[Bn|Tn] = B, E[Fn|Tn] = F, H1b2 and H2b2. Theorem 7 is an extension of their a.s. convergence result when E[Bn|Tn] → B and E[Fn|Tn] → F a.s.

Remark 2 Define R1=(R1), B=E[R1R1], F = E[R1 S′]. If ((R1n, Sn), n ≥ 1) is an i.i.d. sample of (R1, S) whose moments of order 4 exist, assumptions H1b and H2b are verified for Bn=R1nR1n and Fn=R1nSn as E[R1nR1n|Tn]=E[R1R1]=B and E[R1nSn|Tn]=F.

Proof of Theorem 7. Denote

Zn=(Bn-B)(Xn-θ)+(Bn-B)θ-(Fn-F),Xn1=Xn-θ,Yn1=Yn-θ=1nj=1nXj1.

Step 1: give a sufficient condition to have Yn10 a.s.

We have (cf. proof of theorem 1):

Xn+11=(I-aB)Xn1-aZn,Yn+11=1n+1X11+1n+1j=2n+1Xj1=1n+1X11+1n+1j=2n+1(I-aB)Xj-11-a1n+1j=2n+1Zj-1=1n+1X11+nn+1(I-aB)Yn1-a1n+1j=1nZj.

Take now the Frobenius norm of Yn+11:

Yn+11(IaB)Yn1+a1n+1j=1nZj1n+11aX11.

Under H3b, all the eigenvalues of IaB are positive and the spectral norm of IaB is equal to 1 − . Then:

||Yn+11||(1aλ)Yn1+a1n+1j=1nZj1n+11aX11.

By lemma 6, it suffices to prove 1nj=1nZj0 a.s. to conclude Yn10 a.s.

Step 2: prove that assumptions H1b and H2b imply respectively 1nj=1nBjB and 1nj=1nFjF a.s.

The proof is only given for (Bn), the other one being similar.

Assumption H1b3 implies supn E[‖BnB2] < ∞. It follows that, for each element Bnkl and Bkl of Bn and B respectively, n=1Var[Bnkl-Bkl]n2<. Therefore:

1nj=1n(Bjkl-Bkl-E[Bjkl-Bkl|Tj])0a.s.

As E[Bjkl-Bkl|Tj]0 a.s. by H1b1, we have for each (k, l)

1nj=1n(Bjkl-Bkl)0a.s.

Then 1nj=1n(Bj-B)0 a.s.

Step 3: prove now that 1nj=1n(Bj-B)Xj10 a.s.

Denote βn = ‖E[Bn|Tn] − B‖ and γn = ‖E[Fn|Tn] − F‖. βn → 0 and γn → 0 a.s. under H1b1 and H2b1. Then: ∀δ > 0, ∀ε > 0, ∃N(δ, ε): ∀nN(δ, ε),

P({supj>n(βj)δ}{supj>n(γj)δ})>1-ε.

As a<2λλ2+b, choose η such that:

0<η<1b(2λa-(λ2+b))λ>a2(λ2+b+ηb).

Choose δ such that

0<δ<1(1-aλ)(||θ||+2)(λ-a2(λ2+b+ηb)).

Let ε be fixed. Denote N0 = N(δ, ε) and, for n > N0,

Gn=({supN0<jn(βj)δ}{supN0<jn(γj)δ}),G=({supj>N0(βj)δ}{supj>N0(γj)δ})=n>N0Gn.

Remark that Gn is Tn-measurable and, IG denoting the indicator of G,

GGn+1GnIGIGn+1IGn.

Step 3a: prove that supnE[||Xn1||2IGn]<.

||Xn+11||2IGn+1||Xn+11||2IGn=||(I-aB)Xn1IGn-aZnIGn||2||(I-aB)Xn1IGn||2-2a(I-aB)Xn1IGn,ZnIGn+a2||ZnIGn||2.

As the spectral norm ‖IaB‖ = 1 − aλ, taking the conditional expectation with respect to Tn yields a.s.

E[||Xn+11||2IGn+1|Tn](1-aλ)2||Xn1IGn||2-2a(I-aB)Xn1IGn,E[Zn|Tn]IGn+a2E[||ZnIGn||2|Tn].

Now:

||E[Zn|Tn]IGn||=||(E[Bn|Tn]-B)Xn1IGn+(E[Bn|Tn]-B)θIGn-(E[Fn|Tn]-F)IGn||δ||Xn1IGn||+δ(||θ||+1)E[||ZnIGn||2|Tn](1+η)E[||(Bn-B)Xn1IGn||2|Tn]+(1+1η)E[||(Bn-B)θIGn-(Fn-F)IGn||2|Tn](1+η)b||Xn1IGn||2+2(1+1η)(b||θ||2+d).

Therefore:

E[||Xn+11||2IGn+1|Tn]((1-aλ)2+2a(1-aλ)δ+a2(1+η)b)||Xn1IGn||2+2a(1-aλ)δ(||θ||+1)||Xn1IGn||+2a2(1+1η)(b||θ||2+d).

As ||Xn1IGn||1+||Xn1IGn||2, taking mathematical expectation yields:

E[||Xn+11||2IGn+1]ρE[||Xn1IGn||2]+e,ρ=(1-aλ)2+2a(1-aλ)δ(||θ||+2)+a2(1+η)b,e=2a(1-aλ)δ(||θ||+1)+2a2(1+1η)(b||θ||2+d).

As ρ=1+2a((1-aλ)(||θ||+2)δ-λ+a2(λ2+b+ηb))<1 by the choice of δ, this implies g=supnE[||Xn1||2IGn]<.

Step 3b: conclusion.

E[||(Bn-B)Xn1IGn||2]=E[E[||(Bn-B)Xn1IGn||2|Tn]]E[E[||Bn-B||2|Tn]||Xn1IGn||2]bg.

Then: n=1E[||(Bn-B)Xn1IGn||2]n2<. Therefore a.s.:

1nj=1n((Bj-B)Xj1IGj-E[(Bj-B)Xj1IGj|Tj])0.

Now:

n=11nE[||(E[Bn|Tn]-B)Xn1IGn||]n=11nE[||E[Bn|Tn]-B||||Xn1IGn||]n=11n(E[||E[Bn|Tn]-B||2])12(E[||Xn1IGn||2])12g12n=11n(E[||E[Bn|Tn]-B||2])12<byH1b2.

Then:

n=11n||(E[Bn|Tn]-B)Xn1IGn||<a.s.

This implies by the Kronecker lemma:

1nj=1n(E[Bj|Tj]-B)Xj1IGj0a.s.

Therefore:

1nj=1n(Bj-B)Xj1IGj0a.s.

In G, IGj = 1 for all j, therefore 1nj=1n(Bj-B)Xj10 a.s. Then: P(1nj=1n(Bj-B)Xj10)P(G)>1-ε. This is true for every ε > 0. Thus:

1nj=1n(Bj-B)Xj10a.s.

Therefore by step 2 and step 1, we conclude that 1nj=1nZj0 and Yn10 a.s. ∎

3.3 Application to linear regression with online standardized data

Define as in section 2:

Bn=ΓMn-11mnjIn(Rj-R¯Mn-1)(Rj-R¯Mn-1)ΓMn-1,Fn=ΓMn-11mnjIn(Rj-R¯Mn-1)(Sj-S¯Mn-1)ΓMn-11.

Denote U = (RE[R])(RE[R])′, B = ΓE[U]Γ the correlation matrix of R, λ and λmax respectively the smallest and the largest eigenvalue of B, b1 = E[‖ΓUΓ − B2], F = ΓE[(RE[R])(SE[S])′]Γ1.

Corollary 8 Suppose there is no affine relation between the components of R and the moments of order 4 of (R,S) exist. Suppose H3b1 holds:

(H3b1) 0<a<min(1λmax,2λλ2+b1).

Then Yn converges to θ = B−1F a.s.

This process was tested on several datasets and some results are given in section 5 (process S21 for mn = 1 and S22 for mn = 10).

Proof of Corollary 8.

Step 1: introduction.

Using the decomposition of E[Bn|Tn] − B established in the proof of corollary 4, as R¯Mn-1E[R] and ΓMn − 1 ⟶ Γ a.s., it is obvious that E[Bn|Tn] − B ⟶ 0 a.s. Likewise E[Fn|Tn] − F ⟶ 0 a.s. Thus assumptions H1b1 and H2b1 are verified.

Suppose that Yn does not converge to θ almost surely.

Then there exists a set of probability ε1 > 0 in which Yn does not converge to θ.

Denote σj=Var[Rj], j = 1,…,p.

As R¯Mn-1-E[R]0, Mn1Mn11VMn1jσj0, j = 1,…,p and ΓMn − 1 − Γ ⟶ 0 almost surely, there exists a set G of probability greater than 1-ε12 in which these sequences of random variables converge uniformly to θ.

Step 2: prove that n=11n(E[||ΓMn-1-Γ||IG])12<.

By step 2 of the proof of lemma 5, we have for n > N:

||ΓMn1Γ||IGj=1p|Mn1Mn11(VMn1j)2(σj)2|Mn1Mn11VMn1jσj(Mn1Mn11VMn1j+σj)IG.

As in G, Mn-1Mn-1-1VMn-1j converges uniformly to σj for j = 1,…,p, there exists c > 0 such that

||ΓMn-1-Γ||IGcj=1p|Mn-1Mn-1-1(VMn-1j)2-(σj)2|.

Then there exists d > 0 such that

E[||ΓMn-1-Γ||IG]dMn-1dn-1.

Therefore n=11n(E[||ΓMn-1-Γ||IG])12<.

Step 3: prove that assumption H1b2 is verified in G.

Using the decomposition of E[Bn|Tn] − B given in step 1 of the proof of corollary 4, with Rc = RE[R] and R¯Mn-1c=R¯Mn-1-E[R] yields a.s.:

(E[Bn|Tn]-B)IG=((ΓMn-1-Γ)E[RcRc]ΓMn-1+ΓE[RcRc](ΓMn-1-Γ)+ΓMn-1R¯Mn-1c(R¯Mn-1c)ΓMn-1)IG.

As in G, ΓMn−1 − Γ and R¯Mn-1c converge uniformly to 0, E[Bn|Tn] − B converges uniformly to 0. Moreover there exists c1 > 0 such that

||E[Bn|Tn]-B||IGc1(||ΓMn-1-Γ||IG+||R¯Mn-1c||)a.s.

By the proof of lemma 5: E[||R¯Mn-1c||](Var[R]n-1)12; then n=11n(E[||R¯Mn-1c||])12<.

By step 2: n=11n(E[||ΓMn-1-Γ||IG])12<.

Then: n=11n(E[||E[Bn|Tn]-B||IG])12<.

As E[Bn|Tn] − B converges uniformly to 0 on G, we obtain:

n=11n(E[||E[Bn|Tn]-B||2IG])12<.

Thus assumption H1b2 is verified in G.

Step 4: prove that assumption H1b3 is verified in G.

Denote Rc = RE[R], Rjc=Rj-E[R], R¯jc=R¯j-E[R]. Consider the decomposition:

Bn-B=ΓMn-11mnjIn(Rjc-R¯Mn-1c)(Rjc-R¯Mn-1c)ΓMn-1-ΓE[RcRc]Γ=αn+βn
withαn=ΓMn-11mnjIn(RjcRjc-R¯Mn-1cRjc-Rjc(R¯Mn-1c)+R¯Mn-1c(R¯Mn-1c))ΓMn-1-Γ1mnjInRjcRjcΓ=(ΓMn-1-Γ)(1mnjInRjcRjc)ΓMn-1+Γ(1mnjInRjcRjc)(ΓMn-1-Γ)-ΓMn-1R¯Mn-1c1mnjInRjcΓMn-1-ΓMn-11mnjInRjc(R¯Mn-1c)ΓMn-1+ΓMn-1R¯Mn-1c(R¯Mn-1c)ΓMn-1,βn=Γ(1mnjInRjcRjc-E[RcRc])Γ.

Let η > 0.

E[||Bn-B||2IG|Tn]=E[||αn+βn||2IG|Tn](1+1η)E[||αn||2IG|Tn]+(1+η)E[||βn||2IG|Tn]a.s.

As random variables Rjc, jIn, are independent of Tn, as ΓMn−1 and R¯Mn-1c are Tn-measurable and converge uniformly respectively to Γ and 0 on G, E[‖αn2 IG|Tn] converges uniformly to 0. Then, for δ > 0, there exists N1 such that for n > N1, E[‖αn2 IG|Tn] ≤ δ a.s.

Moreover, denoting U = RcRc′ and Uj=RjcRjc, we have, as the random variables Uj form an i.i.d. sample of U:

E[||βn||2|Tn]=E[||1mnjInΓ(Uj-E[U])Γ||2|Tn]E[||Γ(U-E[U])Γ||2]=E[||ΓUΓ-E[ΓUΓ]||2]=b1a.s.

Then:

E[||Bn-B||2IG|Tn](1+1η)δ+(1+η)b1=ba.s.

Thus assumption H1b3 is verified in G.

As S¯Mn-1-E[S]0 and ΓMn-11-Γ10 almost surely, it can be proved likewise that there exist a set H of probability greater than 1-ε12 and d > 0 such that E[‖FnF2 IH|Tn] ≤ d a.s. Thus assumption H2b2 is verified in H.

Step 5: conclusion.

As a<min(1λmax,2λλ2+b1), b1<2λa-λ2.

Choose 0<η<2λa-λ2b1-1 and 0<δ<2λa-λ2-(1+η)b11+1η such that

b=(1+1η)δ+(1+η)b1<2λa-λ2a<2λλ2+b.

Thus assumption H3b is verified.

Applying theorem 7 implies that Yn converges to θ almost surely in HG.

Therefore P(Ynθ) ≥ P(HG) > 1 − ε1.

This is in contradiction with P(Ynθ)=ε1. Thus Yn converges to θ a.s. ∎

4 Convergence of a process with a variable or constant step-size and use of all observations until the current step

In this section, the convergence of the process (Xn, n ≥ 1) in Rp×q recursively defined by

Xn+1=Xn-an(BnXn-Fn)

and its application to sequential linear regression are studied.

4.1 Theorem

Make the following assumptions

(H1c) There exists a positive definite symmetrical matrix B such that BnB a.s.

(H2c) There exists a matrix F such that FnF a.s.

(H3c) λmax denoting the largest eigenvalue of B,

(an=a<1λmax) or (an0,n=1an=).

Theorem 9 Suppose H1c, H2c and H3c hold. Then Xn converges to B−1F a.s.

Proof of Theorem 9.

Denote θ = B−1F, Xn1=Xn-θ, Zn = (BnB)θ − (FnF). Then:

Xn+11=(I-anBn)Xn1-anZn.

Let ω be fixed belonging to the intersection of the convergence sets {BnB} and {FnF}. The writing of ω is omitted in the following.

Denote ‖A‖ the spectral norm of a matrix A and λ the smallest eigenvalue of B.

In the case an depending on n, as an ⟶ 0, we can suppose without loss of generality an<1λmax for all n. Then all the eigenvalues of IanB are positive and ‖IanB‖ = 1 − anλ.

Let 0 < ε < λ. As BnB ⟶ 0, we obtain for n sufficiently large:

||I-anBn||||I-anB||+an||Bn-B||1-anλ+anε,withan<1λ-ε||Xn+11||(1-an(λ-ε))||Xn1||+an||Zn||.

As Zn ⟶ 0, applying lemma 6 yields ||Xn1||0.

Therefore XnB−1F a.s. ∎

4.2 Application to linear regression with online standardized data

Let (mn, n ≥ 1) be a sequence of integers. Denote Mn=k=1nmk for n ≥ 1, M0 = 0 and In = {Mn − 1 + 1,…,Mn}.

Define

Bn=ΓMn(1Mni=1njIiRjRj-R¯MnR¯Mn)ΓMn,Fn=ΓMn(1Mni=1njIiRjSj-R¯MnS¯Mn)ΓMn1.

As ((Rn, Sn), n ≥ 1) is an i.i.d. sample of (R, S), assumptions H1c and H2c are obviously verified with B = ΓE[(RE[R])(RE[R])′]Γ and F = ΓE[(RE[R])(SE[S])′]Γ1. Then:

Corollary 10 Suppose there is no affine relation between the components of R and the moments of order 4 of (R, S) exist. Suppose H3c holds. Then Xn converges to B−1F a.s.

Remark 3 B is the correlation matrix of R of dimension p. Then λmax < Trace(B) = p. In the case of a constant step-size a, it suffices to take a1p to verify H3c.

Remark 4 In the definition of Bn and Fn, the Rj and the Sj are not directly pseudo-centered with respect to R¯Mn and S¯Mn respectively. Another equivalent definition of Bn and Fn can be used. It consists of replacing Rj by Rjm, R¯Mn by R¯Mn-m, Sj by Sjm, S¯Mn by S¯Mn-m1, m and m1 being respectively an estimation of E[R] and E[S] computed in a preliminary phase with a small number of observations. For example, at step n, jInΓMn(Rjm)(ΓMn(Rjm)) is computed instead of jInΓMnRj(ΓMnRj). This limits the risk of numerical explosion.

This process was tested on several datasets and some results are given in section 5 (with a variable step-size: process S13 for mn = 1 and S14 for mn = 10; with a constant step-size: process S31 for mn = 1 and S32 for mn = 10).

5 Experiments

The three previously-defined processes of stochastic approximation with online standardized data were compared with the classical stochastic approximation and averaged stochastic approximation (or averaged stochastic gradient descent) processes with constant step-size (denoted ASGD) studied in [5] and [6]. A description of the methods along with abbreviations and parameters used is given in Table 1.

Table 1. Description of the methods.

Method type Abbreviation Type of data Number of observations used at each step of the process Use of all the observations until the current step Step-size Use of the averaged process
Classic C1 Raw data 1 No variable No
C2 10
C3 1 Yes
C4 10
ASGD A1 1 No constant Yes
A2 1
Standardization 1 S11 Online standardized data 1 No variable No
S12 10
S13 1 Yes
S14 10
Standardization 2 S21 1 No constant Yes
S22 10
Standardization 3 S31 1 Yes No
S32 10

With the variable S set at dimension 1, 11 datasets were considered, some of which are available in free access on the Internet, while others were derived from the EPHESUS study [15]: 6 in regression (continuous dependent variable) and 5 in linear discriminant analysis (binary dependent variable). All datasets used in our experiments are presented in detail in Table 2, along with their download links. An a priori selection of variables was performed on each dataset using a stepwise procedure based on Fisher’s test with p-to-enter and p-to-remove fixed at 5 percent.

Table 2. Datasets used in our experiments.

Dataset name N pa p Type of dependent variable T2 Number of outliers
CADATA 20640 8 8 Continuous 1.6x106 122 www.dcc.fc.up.pt/∼ltorgo/Regression/DataSets.html
AILERONS 7154 40 9 Continuous 247.1 0 www.dcc.fc.up.pt/∼ltorgo/Regression/DataSets.html
ELEVATORS 8752 18 10 Continuous 7.7x104 0 www.dcc.fc.up.pt/∼ltorgo/Regression/DataSets.html
POLY 5000 48 12 Continuous 4.1x104 0 www.dcc.fc.up.pt/∼ltorgo/Regression/DataSets.html
eGFR 21382 31 15 Continuous 2.9x104 0 derived from EPHESUS study [15]
HEMG 21382 31 17 Continuous 6.0x104 0 derived from EPHESUS study [15]
QUANTUM 50000 78 14 Binary 22.5 1068 www.osmot.cs.cornell.edu/kddcup
ADULT 45222 97 95 Binary 4.7x1010 20 www.cs.toronto.edu/∼delve/data/datasets.html
RINGNORM 7400 20 20 Binary 52.8 0 www.cs.toronto.edu/∼delve/data/datasets.html
TWONORM 7400 20 20 Binary 24.9 0 www.cs.toronto.edu/∼delve/data/datasets.html
HOSPHF30D 21382 32 15 Binary 8.1x105 0 derived from EPHESUS study [15]

N denotes the size of global sample, pa the number of parameters available, p the number of parameters selected and T2 the trace of E[RR′]. Outlier is defined as an observation whose the L2 norm is greater than five times the average norm.

Let D = {(ri, si), i = 1, 2,…,N} be the set of data in Rp×R and assuming that it represents the set of realizations of a random vector (R, S) uniformly distributed in D, then minimizing E[(SθRη)2] is equivalent to minimizing 1Ni=1N(si-θri-η)2. One element of D (or several according to the process) is randomly drawn at each step to iterate the process.

To compare the methods, two different studies were performed: one by setting the total number of observations used, the other by setting the computing time.

The choice of step-size, the initialization for each method and the convergence criterion used are respectively presented and commented below.

Choice of step-size

In all methods of stochastic approximation, a suitable choice of step-size is often crucial for obtaining good performance of the process. If the step-size is too small, the convergence rate will be slower. Conversely, if the step-size is too large, a numerical explosion phenomenon may occur during the first iterations.

For the processes with a variable step-size (processes C1 to C4 and S11 to S14), we chose to use an of the following type:

an=cγ(b+n)α.

The constant α=23 was fixed, as suggested by Xu [16] in the case of stochastic approximation in linear regression, and b = 1. The results obtained for the choice cγ=1p are presented although the latter does not correspond to the best choice for a classical method.

For the ASGD method (A1, A2), two different constant step-sizes a as used in [6] were tested: a=1T2 and a=12T2, T2 denoting the trace of E[RR′]. Note that this choice of constant step-size assumes knowing a priori the dataset and is not suitable for a data stream.

For the methods with standardization and a constant step-size a (S21, S22, S31, S32), a=1p was chosen since the matrix E[RR′] is thus the correlation matrix of R, whose trace is equal to p, such that this choice corresponds to that of [6].

Initialization of processes

All processes (Xn) were initialized by X1=0-, the null vector. For the processes with standardization, a small number of observations (n = 1000) were taken into account in order to calculate an initial estimate of the means and standard deviations.

Convergence criterion

The “theoretical vector” θ1 is assigned as that obtained by the least square method in D such that θ1=(θη). Let Θn+11 be the estimator of θ1 obtained by stochastic approximation after n iterations.

In the case of a process (Xn) with standardized data, which yields an estimation of the vector denoted θc in section 1 as θ = Γθc1)−1 and η = E[S] − θE[R], we can define:

Θn+11=(Θn+1Hn+1)withΘn+1=ΓMnXn+1(ΓMn1)-1Hn+1=S¯Mn-Θn+1R¯Mn.

To judge the convergence of the method, the cosine of the angle formed by exact θ1 and its estimation θn+11 was used as criterion,

cos(θ1,θn+11)=θ1θn+11||θ1||2||θn+11||2.

Other criteria, such as ||θ1-θn+11||2||θ1||2 or f(θn+11)-f(θ1)f(θ1), f being the loss function, were also tested, although the results are not presented in this article.

5.1 Study for a fixed total number of observations used

For all N observations used by the algorithm (N being the size of D) up to a maximum of 100N observations, the criterion value associated with each method and for each dataset was recorded. The results obtained after using 10N observations are provided in Table 3.

Table 3. Results after using 10N observations.

CADATA AILERONS ELEVATORS POLY EGFR HEMG QUANTUM ADULT RINGNORM TWONORM HOSPHF30D Mean rank
C1 Expl. -0.0385 Expl. Expl. Expl. Expl. 0.9252 Expl. 0.9998 1.0000 Expl. 11.6
C2 Expl. 0.0680 Expl. Expl. Expl. Expl. 0.8551 Expl. 0.9976 0.9996 Expl. 12.2
C3 Expl. 0.0223 Expl. Expl. Expl. Expl. 0.9262 Expl. 0.9999 1.0000 Expl. 9.9
C4 Expl. -0.0100 Expl. Expl. Expl. Expl. 0.8575 Expl. 0.9981 0.9996 Expl. 12.3
A1 -0.0013 0.4174 0.0005 0.3361 0.2786 0.2005 Expl. 0.0027 0.9998 1.0000 0.0264 9.2
A2 0.0039 0.2526 0.0004 0.1875 0.2375 0.1846 0.0000 0.0022 0.9999 1.0000 0.2047 8.8
S11 1.0000 0.9516 0.9298 1.0000 1.0000 0.9996 0.9999 0.7599 0.9999 1.0000 0.7723 5.2
S12 0.9999 0.9579 0.9311 1.0000 0.9999 0.9994 0.9991 0.6842 0.9999 1.0000 0.4566 6.1
S13 1.0000 0.9802 0.9306 1.0000 1.0000 0.9998 1.0000 0.7142 0.9999 1.0000 0.7754 3.7
S14 0.9999 0.9732 0.9303 1.0000 0.9999 0.9994 0.9991 0.6225 0.9998 1.0000 0.4551 6.9
S21 0.9993 0.6261 0.9935 Expl. Expl. Expl. Expl. Expl. 0.9998 1.0000 Expl. 10.5
S22 1.0000 0.9977 0.9900 1.0000 1.0000 0.9989 0.9999 -0.0094 0.9999 1.0000 0.9454 4.1
S31 1.0000 0.9988 0.9999 1.0000 1.0000 0.9992 0.9999 0.9907 0.9999 1.0000 0.9788 2.3
S32 1.0000 0.9991 0.9998 1.0000 1.0000 0.9992 0.9999 0.9867 0.9999 1.0000 0.9806 2.2

Expl. means numerical explosion.

As can be seen in Table 3, a numerical explosion occured in most datasets using the classical methods with raw data and a variable step-size (C1 to C4). As noted in Table 2, these datasets had a high T2 = Tr(E[RR′]). Corresponding methods S11 to S14 using the same variable step-size but with online standardized data quickly converged in most cases. However classical methods with raw data can yield good results for a suitable choice of step-size, as demonstrated by the results obtained for POLY dataset in Fig 1. The numerical explosion can arise from a too high step-size when n is small. This phenomenon can be avoided if the step-size is reduced, although if the latter is too small, the convergence rate will be slowed. Hence, the right balance must be found between step-size and convergence rate. Furthermore, the choice of this step-size generally depends on the dataset which is not known a priori in the case of a data stream. In conclusion, methods with standardized data appear to be more robust to the choice of step-size.

Fig 1. Results obtained for dataset POLY using 10N and 100N observations: A/ process C1 with variable step-size an=1(b+n)23 by varying b, B/ process C1 with variable step-size an=1p(b+n)23 by varying b, C/ process S21 by varying constant step-size a.

Fig 1

The ASGD method (A1 with constant step-size a=1T2 and A2 with a=12T2) did not yield good results except for the RINGNORM and TWONORM datasets which were obtained by simulation (note that all methods functioned very well for these two datasets). Of note, A1 exploded for the QUANTUM dataset containing 1068 observations (2.1%) whose L2 norm was fivefold greater than the average norm (Table 2). The corresponding method S21 with online standardized data yielded several numerical explosions with the a=1p step-size, however these explosions disappeared when using a smaller step-size (see Fig 1). Of note, it is assumed in corollary 8 that 0<a<min(1λmax,2λλ2+b1); in the case of a=1p, only a<1λmax is certain.

Finally, for methods S31 and S32 with standardized data, the use of all observations until the current step and the very simple choice of the constant step-size a=1p uniformly yielded good results.

Thereafter, for each fixed number of observations used and for each dataset, the 14 methods ranging from the best (the highest cosine) to the worst (the lowest cosine) were ranked by assigning each of the latter a rank from 1 to 14 respectively, after which the mean rank in all 11 datasets was calculated for each method. A total of 100 mean rank values were calculated for a number of observations used varying from N to 100N. The graph depicting the change in mean rank based on the number of observations used and the boxplot of the mean rank are shown in Fig 2.

Fig 2. Results for a fixed total number of observations used: A/ change in the mean rank based on the number of observations used, B/ boxplot of the mean rank by method.

Fig 2

Overall, for these 11 datasets, a method with standardized data, a constant step-size and use of all observations until the current step (S31, S32) represented the best method when the total number of observations used was fixed.

5.2 Study for a fixed processing time

For every second up to a maximum of 2 minutes, the criterion value associated to each dataset was recorded. The results obtained after a processing time of 1 minute are provided in Table 4.

Table 4. Results obtained after a fixed time of 1 minute.

CADATA AILERONS ELEVATORS POLY EGFR HEMG QUANTUM ADULT RINGNORM TWONORM HOSPHF30D Mean rank
C1 Expl. -0.2486 Expl. Expl. Expl. Expl. 0.9561 Expl. 1.0000 1.0000 Expl. 12.2
C2 Expl. 0.7719 Expl. Expl. Expl. Expl. 0.9519 Expl. 1.0000 1.0000 Expl. 9.9
C3 Expl. 0.4206 Expl. Expl. Expl. Expl. 0.9547 Expl. 1.0000 1.0000 Expl. 10.6
C4 Expl. 0.0504 Expl. Expl. Expl. Expl. 0.9439 Expl. 1.0000 1.0000 Expl. 10.1
A1 -0.0067 0.8323 0.0022 0.9974 0.7049 0.2964 Expl. 0.0036 1.0000 1.0000 Expl. 9.0
A2 0.0131 0.8269 0.0015 0.9893 0.5100 0.2648 Expl. 0.0027 1.0000 1.0000 0.2521 8.6
S11 1.0000 0.9858 0.9305 1.0000 1.0000 1.0000 1.0000 0.6786 1.0000 1.0000 0.9686 5.8
S12 1.0000 0.9767 0.9276 1.0000 1.0000 0.9999 1.0000 0.6644 1.0000 1.0000 0.9112 5.8
S13 1.0000 0.9814 0.9299 1.0000 1.0000 0.9999 1.0000 0.4538 1.0000 1.0000 0.9329 6.1
S14 1.0000 0.9760 0.9274 1.0000 1.0000 1.0000 0.9999 0.5932 1.0000 1.0000 0.8801 6.1
S21 -0.9998 0.2424 0.6665 Expl. Expl. Expl. Expl. 0.0000 1.0000 1.0000 Expl. 11.5
S22 1.0000 0.9999 1.0000 1.0000 1.0000 1.0000 1.0000 -0.0159 1.0000 1.0000 0.9995 3.1
S31 1.0000 0.9995 1.0000 1.0000 1.0000 0.9999 1.0000 0.9533 1.0000 1.0000 0.9997 4.5
S32 1.0000 0.9999 1.0000 1.0000 1.0000 1.0000 1.0000 0.9820 1.0000 1.0000 0.9999 1.5

Expl. means numerical explosion.

The same conclusions can be drawn as those described in section 5.1 for the classical methods and the ASGD method. The methods with online standardized data typically faired better.

As in the previous study in section 5.1, the 14 methods were ranked from the best to the worst on the basis of the mean rank for a fixed processing time. The graph depicting the change in mean rank based on the processing time varying from 1 second to 2 minutes as well as the boxplot of the mean rank are shown in Fig 3.

Fig 3. Results for a fixed processing time: A/ change in the mean rank based on the processing time, B/ boxplot of the mean rank by method.

Fig 3

As can be seen, these methods with online standardized data using more than one observation per step yielded the best results (S32, S22). One explanation may be that the total number of observations used in a fixed processing time is higher when several observations are used per step rather than one observation per step. This can be verified in Table 5 in which the total number of observations used per second for each method and for each dataset during a processing time of 2 minutes is given. Of note, the number of observations used per second in a process with standardized data and one observation per step (S11, S13, S21, S31) was found to be generally lower than in a process with raw data and one observation per step (C1, C3, A1, A2), since a method with standardization requires the recursive estimation of means and variances at each step.

Table 5. Number of observations used after 2 minutes (expressed in number of observations per second).

CADATA AILERONS ELEVATORS POLY EGFR HEMG QUANTUM ADULT RINGNORM TWONORM HOSPHF30D
C1 19843 33170 17133 14300 10979 9243 33021 476 31843 31677 10922
C2 166473 291558 159134 134249 104152 89485 281384 4565 262847 261881 102563
C3 17206 28985 16036 13449 10383 8878 28707 462 28123 28472 10404
C4 132088 194031 125880 106259 87844 76128 184386 4252 171711 166878 86895
A1 33622 35388 36540 35800 35280 34494 11815 15390 34898 34216 14049
A2 33317 32807 36271 35628 35314 34454 15439 16349 34401 34205 34890
S11 17174 17133 17166 16783 15648 14764 16296 1122 14067 13836 14334
S12 45717 47209 45893 43470 39937 37376 40943 4554 34799 34507 36389
S13 12062 12731 11888 12057 11211 10369 11466 620 9687 9526 10137
S14 43674 46080 43068 42123 38350 35338 39170 4512 33594 31333 32701
S21 15396 17997 16772 10265 8404 7238 9166 996 13942 13274 7672
S22 47156 47865 46318 43899 40325 37467 41320 4577 34478 31758 37418
S31 12495 12859 12775 12350 11495 10619 11608 621 9890 9694 10863
S32 44827 47035 45123 42398 38932 36288 39362 4532 33435 33385 35556

Of note, for the ADULT dataset with a large number of parameters selected (95), the only method yielding sufficiently adequate results after a processing time of one minute was S32, and methods S31 and S32 when 10N observations were used.

6 Conclusion

In the present study, three processes with online standardized data were defined and for which their a.s. convergence was proven.

A stochastic approximation method with standardized data appears to be advantageous compared to a method with raw data. First, it is easier to choose the step-size. For processes S31 and S32 for example, the definition of a constant step-size only requires knowing the number of parameters p. Secondly, the standardization usually allows avoiding the phenomenon of numerical explosion often obtained in the examples given with a classical method.

The use of all observations until the current step can reduce the influence of outliers and increase the convergence rate of a process. Moreover, this approach is particularly adapted to the case of a data stream.

Finally, among all processes tested on 11 different datasets (linear regression or linear discriminant analysis), the best was a method using standardization, a constant step-size equal to 1p and all observations until the current step, and the use of several new observations at each step improved the convergence rate.

Data Availability

All datasets used in our experiments except those derived from EPHESUS study are available online and links to download these data appear in Table 2 of our article. Due to legal restrictions, data from EPHESUS study are only available upon request. Interested researchers may request access to data upon approval from the EPHESUS Executive Steering Committee of the study. This committee can be reached through Pr Faiez Zannad (f.zannad@chu-nancy.fr) who is member of this board.

Funding Statement

This work is supported by a public grant overseen by the French National Research Agency (ANR) as part of the second “Investissements d’Avenir” programme (reference: ANR-15-RHU-0004). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.

References

  • 1. Monnez JM. Le processus d’approximation stochastique de Robbins-Monro: résultats théoriques; estimation séquentielle d’une espérance conditionnelle. Statistique et Analyse des Données. 1979;4(2):11–29. [Google Scholar]
  • 2. Ljung L. Analysis of stochastic gradient algorithms for linear regression problems. IEEE Transactions on Information Theory. 1984;30(2):151–160. doi: 10.1109/TIT.1984.1056895 [Google Scholar]
  • 3. Polyak BT. New method of stochastic approximation type. Automation and remote control. 1990;51(7):937–946. [Google Scholar]
  • 4. Polyak BT, Juditsky AB. Acceleration of stochastic approximation by averaging. SIAM Journal on Control and Optimization. 1992;30(4):838–855. doi: 10.1137/0330046 [Google Scholar]
  • 5. Györfi L, Walk H. On the averaged stochastic approximation for linear regression. SIAM Journal on Control and Optimization. 1996;34(1):31–61. doi: 10.1137/S0363012992226661 [Google Scholar]
  • 6. Bach F, Moulines E. Non-strongly-convex smooth stochastic approximation with convergence rate O(1/n). Advances in Neural Information Processing Systems. 2013;773–781. [Google Scholar]
  • 7. Bottou L, Le Cun Y. On-line learning for very large data sets. Applied Stochastic Models in Business and Industry. 2005;21(2):137–151. doi: 10.1002/asmb.538 [Google Scholar]
  • 8.Bottou L, Curtis FE, Noceda J. Optimization Methods for Large-Scale Machine Learning. arXiv:1606.04838v2. 2017.
  • 9. Johnson R, Zhang Tong. Accelerating Stochastic Gradient Descent using Predictive Variance Reduction. Advances in Neural Information Processing Systems. 2013:315–323. [Google Scholar]
  • 10. Duchi J, Hazan E, Singer Y. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. Journal of Machine Learning Research. 2011;12:2121–2159. [Google Scholar]
  • 11.Pascanu R, Mikolov T, Bengio Y. Understanding the exploding gradient problem. arXiv:1211.5063v1. 2012.
  • 12. Robbins H, Siegmund D. A convergence theorem for nonnegative almost supermartingales and some applications Optimizing Methods in Statistics, Rustagi J.S. (ed.), Academic Press, New York: 1971;233–257. [Google Scholar]
  • 13.Schmetterer L. Multidimensional stochastic approximation. Multivariate Analysis II, Proc. 2nd Int. Symp., Dayton, Ohio, Academic Press. 1969;443–460.
  • 14. Venter JH. On Dvoretzky stochastic approximation theorems. The Annals of Mathematical Statistics. 1966;37:1534–1544. doi: 10.1214/aoms/1177699145 [Google Scholar]
  • 15. Pitt B., Remme W., Zannad F. et al. Eplerenone, a selective aldosterone blocker, in patients with left ventricular dysfunction after myocardial infarction. New England Journal of Medicine. 2003;348(14):1309–1321. doi: 10.1056/NEJMoa030207 [DOI] [PubMed] [Google Scholar]
  • 16.Xu W. Towards optimal one pass large scale learning with averaged stochastic gradient descent. arXiv:1107.2490v2. 2011.

Associated Data

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

Data Availability Statement

All datasets used in our experiments except those derived from EPHESUS study are available online and links to download these data appear in Table 2 of our article. Due to legal restrictions, data from EPHESUS study are only available upon request. Interested researchers may request access to data upon approval from the EPHESUS Executive Steering Committee of the study. This committee can be reached through Pr Faiez Zannad (f.zannad@chu-nancy.fr) who is member of this board.


Articles from PLoS ONE are provided here courtesy of PLOS

RESOURCES