Denote length of label vector differently

There is no reason for the number of labels to be the same as the number of samples (here denoted by N).  That's why I'm suggesting M... (could be L, like 'labels', but number of features is denoted by D, not F, so why not M :))