Skip to main content
. 2025 Feb 27;27(3):249. doi: 10.3390/e27030249
Algorithm 1: Theoretical k-means algorithm for Pareto I and II distributions
  • Step 1: For a given pdf p(x), the number of MSE-RPs m, initial iteration t=0, and tolerance ϵ, input an initial set of number-theoretic methods representative points (NTM-RPs) [16] 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) x, j=1,,m;
  • Step 3: Calculate conditional means:

    For j=1,,m1:
    yj(t+1)=Ij(t)xp(x) dxIj(t)p(x) dx=Ij(t)xp(x) dxpj(t), j=1,,m1.
    For P(I)(1,α):
    ym(t+1)=αα2ym1(t+1).
    For P(II)(0,1,α):
    ym(t+1)=αym1(t+1)+2α2.
  • Step 4: Sort {y1(t+1),,ym(t+1)} from smallest to largest.

  • Step 5: Calculate |ym(t+1)b|, where
    b=Im(t)xp(x) dxpm(t).
  • Step 6: If |ym(t+1)b|<ϵ, 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.