Skip to main content
. 2025 Feb 27;27(3):249. doi: 10.3390/e27030249
Algorithm 2: Parametric k-means algorithm
  • Step 1: For a given pdf p(x), the number of MSE-RPs m, and initial iteration t=0, input an initial set of points y1(t)<y2(t)<<ym(t). Define a partition of R as:
    Ii(t)=ai(t),ai+1(t), i=1,,m1, Im(t)=am1(t),am(t),
    where:
    a1(t)=, ai(t)=yi1(t)+yi(t)2, i=2,,m, am(t)=.
  • Step 2: Calculate probabilities:
    pj(t)=Ij(t)p(x)dx, j=1,,m;
  • Step 3: Calculate conditional means:
    yj(t+1)=Ij(t)xp(x)dxIj(t)p(x)dx=Ij(t)xp(x)dxpj(t),j=1,,m.
  • Step 4: If {yj(t)} and {yj(t+1)} are identical, the process stops, and {yj(t)} are delivered as the MSE-RPs of the distribution with probabilities {pj(t)}. Otherwise, let t:=t+1 and return to Step 1.