Skip to main content
. 2022 Dec 15;22(24):9878. doi: 10.3390/s22249878
Algorithm 2 Compressed learning memory selection.
Input: Compressed samples X1, Non-Compressed samples X2, Number of samples per class Nt, Compression rate p, Total number of seen classes Ct;
Initialize: Memory M← {} * M;
  • 1:

    for<c=0,1,2,..Ct>do                                                       ▹ Iterate through all seen classes.

  • 2:

        nc,X1c,X2cNt[c],X1[c],X2[c]     ▹ Populate data from the compressed learning process.

  • 3:

        MM+RandSelect(X1c,min(nc, len(X1c)))     ▹ Random sampling through the Compressed samples.

  • 4:

        nc(ncmin(nc, len(X1c)))  p Update the maximum number of available spaces for the Non-Compressed samples.

  • 5:

        MM+RandSelect(X2c,min(nc, len(X2c)))         ▹ Random sampling through the Non-Compressed samples.