IFD:EAI SoS21/course material/Session 4: Programming the Classifier Part1: Difference between revisions

From Medien Wiki
Line 35: Line 35:
<syntaxhighlight lang="c++">
<syntaxhighlight lang="c++">
vector<Point2D> points = {p0, p1, p2, p3};
vector<Point2D> points = {p0, p1, p2, p3};
vector<int> classLabels = {0, 0, 1, 1};
vector<int> classLabels = {0, 1, 0, 0};
KMeans clusterer = KMeans(points, classLabels, 2);
KMeans clusterer = KMeans(points, classLabels, 2);
</syntaxhighlight>
</syntaxhighlight>