This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
assignments:assignment1 [2016/08/31 19:04] asa [Part 2: The nearest centroid classifier] |
assignments:assignment1 [2016/08/31 19:07] (current) asa [Part 2: The nearest centroid classifier] |
||
---|---|---|---|
Line 52: | Line 52: | ||
Show that for a binary classification problem where the number of positive examples equals the number of negative examples the nearest centroid classifier can be expressed as a linear classifier with the weight vector | Show that for a binary classification problem where the number of positive examples equals the number of negative examples the nearest centroid classifier can be expressed as a linear classifier with the weight vector | ||
$$\mathbf{w} = \frac{1}{N}\sum_{i=1}^N y_i \mathbf{x}_i.$$ | $$\mathbf{w} = \frac{1}{N}\sum_{i=1}^N y_i \mathbf{x}_i.$$ | ||
- | Hint: consider the vector that connects the centroids of the two classes and draw a figure in two dimensions to help you think about the problem. Also note that this form only holds if the two classes have equal number of examples. | + | Hint: consider the vector that connects the centroids of the two classes and draw a figure in two dimensions to help you think about the problem. Also note that this form only holds if the two classes have equal number of examples, so we'll assume that is the case. |
===== Part 3: Are my features useful? ===== | ===== Part 3: Are my features useful? ===== |