Skip to content

Commit 5526077

Browse files
authored
Update build-a-k-nearest-neighbor-model-with-p5js.mdx
1 parent ed9feb7 commit 5526077

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

projects/build-a-k-nearest-neighbor-model-with-p5js/build-a-k-nearest-neighbor-model-with-p5js.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,15 @@ To decide, you compare their stats to characters you've already created. If most
5050

5151
<img src="https://i.imgur.com/4hEBmgd.png" alt="video game characters" width="30%"></img>
5252

53-
That's KNN: look at the most similar examples, count the votes, and classify the new datapoint as the majority class.
54-
55-
If you'd like to learn more about Machine Learning models and KNN, check out our [ML course](https://www.codedex.io/machine-learning)!
56-
57-
![](https://i.imgur.com/vc2Iy9j.gif)
53+
That's KNN: look at the most similar examples, count the votes, and classify the new datapoint as the majority class. If you'd like to learn more about Machine Learning models and KNN, check out our [ML course](https://www.codedex.io/machine-learning)!
5854

5955
## Visualization with p5.js
6056

61-
[p5.js](https://www.codedex.io/p5js), a JavaScript library for creative coding, is one of my favorite programming tools, because it allows us to easily visualize complex ideas. When I was a high school computer science teacher, I would use p5.js in my classroom to introduce fundamental machine learning concepts to the students.
57+
So what's p5? [p5.js](https://www.codedex.io/p5js), a JavaScript library for creative coding, is one of my favorite programming tools, because it allows us to easily visualize complex ideas. When I was a high school computer science teacher, I would use p5.js in my classroom to introduce fundamental machine learning concepts to the students.
6258

63-
In this project, we'll do exactly that! We'll create a visual demo of a K-Nearest Neighbor machine learning model using p5.js.
59+
In this project, we'll do exactly that! We'll create a visual demo of a K-Nearest Neighbor machine learning model using p5.js. Like this:
60+
61+
![](https://i.imgur.com/vc2Iy9j.gif)
6462

6563
Instead of warriors and wizards, our “characters” will simply be red 🔴 and green 🟢 points scattered across a canvas.
6664

0 commit comments

Comments
 (0)