Skip to main content
. 2021 Oct 8;21(19):6689. doi: 10.3390/s21196689
Algorithm 5:DIM-CORESET(A,k,ε)

  • 1:

    Input: A matrix ARn×d, an integer k[d], and an error parameter ε(0,1).

  • 2:

    Output: A diagonal matrix WRn×n that satisfies Corollary 7.

  • 3:

    r:=1+maxi[n]4ai2ε4 {where ai is the ith row of A}

  • 4:

    U,Σ,V: = the full SVD of [A(r,,r)T]Rn×(d+1)

  • 5:

    vi:=Ui,1,,Ui,k,Ui,k+1:dΣk+1:d,k+1:dΣk+1:d,k+1:dF for every i[n]

  • 6:

    vi˜:= the row stacking of viviTRd×d for every i[n]

  • 7:

    (v1˜,,vn˜,u): = a vector summarization (ε5k)2-coreset for (v1˜,,vn˜,(1,,1)).

  • 8:

    W:= a diagonal matrix in Rn×n, where Wi,i=ui, i[n].

  • 9:

    ReturnW