Skip to main content
. 2022 Dec 21;23(1):55. doi: 10.3390/s23010055
Algorithm 1 The multi-level quantization algorithm based on PPF
Input: The normalized feature vector H¯α,k; the quantization factor δ with a default value: 102
Output: The quantized bit sequence Qα;
  •   1:

    Calculate the mean μ and the standard deviation σ of the feature vector H¯α,k;

  •   2:

    Use PPF of the scipy.stats library (ppf) to confirm the benchmarks;

  •   3:

    low1=ppf(0.25δ,loc=μ,scale=σ);

  •   4:

    high1=ppf(0.25+δ,loc=μ,scale=σ);

  •   5:

    low2=ppf(0.75δ,loc=μ,scale=σ);

  •   6:

    high2=ppf(0.75+δ,loc=μ,scale=σ);

  •   7:

    Initialize Qα as an empty list;

  •   8:

    foriinrange(len(H¯α,k))do

  •   9:

      if H¯α,k,i>=low1 and H¯α,k,i<=high1 then

  • 10:

       Qα.append(0)

  • 11:

      else

  • 12:

       if H¯α,k,i>=low2 and H¯α,k,i<=high2 then

  • 13:

        Qα.append(1)

  • 14:

       else

  • 15:

        Qα.append(1)

  • 16:

       end if

  • 17:

      end if

  • 18:

    end for

  • 19:

    return Qα.