721
edits
Line 36: | Line 36: | ||
vector<Point2D> points = {p0, p1, p2, p3}; | vector<Point2D> points = {p0, p1, p2, p3}; | ||
vector<int> classLabels = {0, 1, 0, 0}; | vector<int> classLabels = {0, 1, 0, 0}; | ||
KMeans | KMeans classifier = KMeans(points, classLabels, 2); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Our clusterer is a class called "KMeans" because it most closely resembles a KMeans classifier. | |||
There are a few new elements that we added to our code this week. We added a new class called 'KMeans'. Inside this class will be the guts of our classifier. | There are a few new elements that we added to our code this week. We added a new class called 'KMeans'. Inside this class will be the guts of our classifier. | ||