Skip to content

Commit 2fe002c

Browse files
committed
fixed k-means video
changed block with embedded video
1 parent 47ea799 commit 2fe002c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_apple-2-blog/k-means.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "K-means by another means"
3-
excerpt: "Success! There is machine learning happening on my Apple ]\[+."
3+
excerpt: "Success! There is machine learning happening on my Apple ][+."
44
tags:
55
- K-means
66
- machine learning
@@ -15,7 +15,7 @@ Wait. Does k-means count as machine learning? Yes. It does.
1515

1616
Unlike [previously](/apple-2-blog/synthesizing-data/) where I saved the result for the end, let's start by taking a look at the algorithm in action!
1717

18-
[![Video of Apple][+ running k-means](https://img.youtube.com/vi/xi876Gqt4jk/0.jpg)](https://youtube.com/shorts/Cy0wMMLObVA "Video of Apple]\[+ running k-means"){:target="_blank"}
18+
[![Video of Apple 2+ running k-means](https://img.youtube.com/vi/Cy0wMMLObVA/0.jpg)](https://youtube.com/shorts/Cy0wMMLObVA "Video of Apple ][+ running k-means"){:target="_blank"}
1919

2020
For debugging purposes, to speed up execution, I reduced the number of samples in each class to 5. That's obviously pretty small but you can see the algorithm iterating. At the end of each loop I draw a line between the latest estimates of cluster centroids. The perpendicular bisector of these segments are the decision boundaries between the classes, so I draw that, too. Some of the code was written to handle more than two classes but here there are only two which makes this relatively easy.
2121

0 commit comments

Comments
 (0)