Previously, in MC-LDA & SubLDA, labels required to be from a set of integers in the range 1:nc where nc is a total number of classes. That created a problem when some labels in this range where not present in the label collection. e.g. [1,1,3,3,3] label collection has two classes but maximum value of label is 3. This was intentional design decision because label set was used for indexing features during calculation of feature centers. Thus, to avoid incorrect indexing the number of classes parameter was used.
This PR removes the "number of classes" parameter and estimates a number of classes from a number of unique labels. Additionally, PR removes type limitation on label collection.
Previously, in MC-LDA & SubLDA, labels required to be from a set of integers in the range
1:nc
wherenc
is a total number of classes. That created a problem when some labels in this range where not present in the label collection. e.g.[1,1,3,3,3]
label collection has two classes but maximum value of label is3
. This was intentional design decision because label set was used for indexing features during calculation of feature centers. Thus, to avoid incorrect indexing the number of classes parameter was used. This PR removes the "number of classes" parameter and estimates a number of classes from a number of unique labels. Additionally, PR removes type limitation on label collection.