Commit 05b35386 authored by Davis King's avatar Davis King

updated the kkmeans example

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402321
parent 842bdb4a
...@@ -101,10 +101,9 @@ int main() ...@@ -101,10 +101,9 @@ int main()
test.set_number_of_centers(3); test.set_number_of_centers(3);
// You need to pick some initial centers for the k-means algorithm. So here // You need to pick some initial centers for the k-means algorithm. So here
// we will pick a point from each of the classes. // we will use the dlib::pick_initial_centers() function which tries to find
initial_centers.push_back(samples[0]); // n points that are far apart (basically).
initial_centers.push_back(samples[num]); pick_initial_centers(3, initial_centers, samples, test.get_kernel());
initial_centers.push_back(samples[num*2]);
// now run the k-means algorithm on our set of samples. Note that the train function expects // now run the k-means algorithm on our set of samples. Note that the train function expects
// its arguments to be dlib::matrix objects so since we have our samples in std::vector objects // its arguments to be dlib::matrix objects so since we have our samples in std::vector objects
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment