测试代码(matlab)如下: clear; load E:\dataset\USPS\USPS.mat; % data format: % Xtr n1*dim % Xte n2*dim % Ytr n1*1 % Yte n2*1 % warning: labels must range from 1 to n, n is the number of labels % other label values will make mistakes u=unique(Ytr); Nclass=len…