IFD:EAI SoS21/course material/Session 4: Programming the Classifier Part1: Difference between revisions
From Medien Wiki
Line 7: | Line 7: | ||
=Description of Classifier Code from Session 4= | =Description of Classifier Code from Session 4= | ||
Until now, we have been looking at points on a 2D plane. We know how to calculate the distance between them and how to find the centroid of a point cloud. Let's call these point | Until now, we have been looking at points on a 2D plane. We know how to calculate the distance between them and how to find the centroid of a point cloud. Let's call these point clouds classes from now on. With this tool set at hand, we can already code a simple classifier. We could e.g. detect whether any given point (P_new) is closer to the point cloud which we call class_0 or class_1. We can find out, by calculating the distances of P_new to the centroids of the classes c_0 abd c_1 as shown in the picture below. | ||
[[File:2d_classify.png|800px]] | [[File:2d_classify.png|800px]] |