made this exampler simpler

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402379
This commit is contained in:
Davis King 2008-07-05 17:32:47 +00:00
parent edca3eca59
commit b51cc5c295

View File

@ -104,12 +104,8 @@ int main()
kcentroid<kernel_type> kc(kernel_type(0.05), 0.001); kcentroid<kernel_type> kc(kernel_type(0.05), 0.001);
// And finally we get to the feature ranking. Here we call rank_features() with the kcentroid we just made, // And finally we get to the feature ranking. Here we call rank_features() with the kcentroid we just made,
// the samples and labels we made above, and the number of features we want it to rank. Note that // the samples and labels we made above, and the number of features we want it to rank.
// rank_features() operates on dlib::matrix objects so we need to use the vector_to_matrix() function cout << rank_features(kc, samples, labels, 4) << endl;
// to cast the std::vector objects to dlib::matrix. Also note that the vector_to_matrix() doesn't actually
// copy the std::vector, but instead it uses a template expression technique to recast it as a dlib::matrix
// object. (see the dlib::matrix example and documentation for more details on template expressions).
cout << rank_features(kc, vector_to_matrix(samples), vector_to_matrix(labels), 4) << endl;
// The output is: // The output is:
/* /*