I’m using Non-Negative Matrix Factorization (NMF) in sklearn for unsupervised category prediction (with labels for checking accuracy), but am running into the problem where I don’t have a clear map between input categories and transformed categories.
For example, if my categories are “A”, “B”, and “C” (n_components=3) I don’t know which order the transformed categories will be in. I can manually print the data associated with each output feature to determine which input it most closely resembles, but am looking for an automatic solution.
Is there a convenient method for this, or do I need to perform guess-and-check to see what category order maximizes accuracy (very slow for large numbers of categories)?