Skip to main content
. 2021 Aug 22;23(8):1090. doi: 10.3390/e23081090
Algorithm 2: (Few-shot AI corrector [83]: 1NN version. Deployment). Input: a data vector x, the set’s X centroid vector x¯, matrices H, W, the number of clusters, k, cluster centroids y¯1,,y¯k, threshold, θ (or thresholds θ1,,θk), discriminant vectors, wi, i=1,,k.
  1. Compute
    xw=WH(xx¯)
  2. Determine
    =argminixwy¯i.
  3. Associate the vector x with the set Y if (w,xw)>θ and with the set X otherwise. If multiple thresholds are given then associate the vector x with the set Y if (w,xw)>θ and with the set X otherwise.

Output: a label attributed to the vector x.