Algorithm 1: (Few-shot AI corrector [83]: 1NN version. Training). Input: sets , ; the number of clusters, k; threshold, (or thresholds ). |
Determining the centroid of the . Generate two sets, , the centralised set , and , the set obtained from by subtracting from each of its elements.
Construct Principal Components for the centralised set .
Using Kaiser, broken stick, conditioning rule, or otherwise, select Principal Components, , corresponding to the first largest eivenvalues of the covariance matrix of the set , and project the centralized set as well as onto these vectors. The operation returns sets and , respectively:
Construct matrix W
corresponding to the whitening transformation for the set . Apply the whitening transformation to sets and . This returns sets and :
Cluster the set into k clusters (using e.g. the k-means algorithm or otherwise). Let be their corresponding centroids.
-
For each pair , , construct (normalised) Fisher discriminants :
An element is associated with the set if and with the set if .
If multiple thresholds are given then an element is associated with the set if and with the set if .
Output: vectors , , , matrices H and W. |