Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Jul 6, 2022
1 parent aea4d2f commit 7d55fc5
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 380 deletions.
16 changes: 15 additions & 1 deletion kmeans/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In this project, we'll build a k-means clustering algorithm from scratch. Clustering is an unsupervised machine learning technique that can find patterns in your data. K-means is one of the most popular forms of clustering.

We'll create our algorithm using Python and pandas. We'll then compare it to the reference implementation from scikit-learn.
We'll create our algorithm using python and pandas. We'll then compare it to the reference implementation from scikit-learn.

**Project Steps**

Expand All @@ -11,6 +11,20 @@ We'll create our algorithm using Python and pandas. We'll then compare it to th
* Plot the clusters from the algorithm
* Compare performance to the scikit-learn algorithm

# K-means overview

K-means is an unsupervised machine learning technique that allow us to cluster data points. This enables us to find patterns in the data that can help us analyze it more effectively. K-means is an iterative algorithm, so it will conve

To run a k-means clustering:

1. Specify the number of clusters you want (usually referred to as `k`).
2. Randomly initialize the `centroid` for each cluster. The centroid is the data point that is in the center of the cluster.
3. Determine which data points belong to which cluster by finding the closest `centroid` to each data point.
4. Update the centroids based on the geometric mean of all the data points in the cluster.
5. Run 3 and 4 until the `centroids` stop changing. Each run is referred to as an iteration.

![k-means convergence](images/K-means_convergence.gif)

## Code

You can find the code for this project [here](https://github.com/dataquestio/project-walkthroughs/tree/master/kmeans).
Expand Down
Loading

0 comments on commit 7d55fc5

Please sign in to comment.