hi guys, i am new to PyCIL and watching the source codes currently. i am really confuse about the key idea behind the selection of exemplars , following codes really confuse me. Maybe a hint please?
# Select
selected_exemplars = []
exemplar_vectors = []
for k in range(1, m+1):
S = np.sum(exemplar_vectors, axis=0) # [feature_dim] sum of selected exemplars vectors
mu_p = (vectors + S) / k # [n, feature_dim] sum to all vectors
i = np.argmin(np.sqrt(np.sum((class_mean - mu_p) ** 2, axis=1)))
selected_exemplars.append(np.array(data[i])) # New object to avoid passing by inference
exemplar_vectors.append(np.array(vectors[i])) # New object to avoid passing by inference
vectors = np.delete(vectors, i, axis=0) # Remove it to avoid duplicative selection
data = np.delete(data, i, axis=0) # Remove it to avoid duplicative selection
hi guys, i am new to PyCIL and watching the source codes currently. i am really confuse about the key idea behind the selection of exemplars , following codes really confuse me. Maybe a hint please?