721
edits
Line 23: | Line 23: | ||
=Description of the classifier code= | =Description of the classifier code= | ||
To be able to successfully classify a new point (a sound), the classifier actually only needs to know the <code>centroid of each class</code> and a way to <code>find the closest centroid</code> to our new point. | |||
As a first step the classifier needs to calculate the centroids. To do that we feed it with the following data: | As a first step the classifier needs to calculate the centroids. To do that we feed it with the following data: | ||
* all our given points (=measurements of sounds) | * all our given points (=measurements of sounds) | ||
* for every point we tell the classifier to which class it belongs (=classLabels) | * for every point we tell the classifier to which class it belongs (=classLabels) | ||
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. | |||
=Homework= | =Homework= |