Skip to content

Commit a293060

Browse files
authored
Merge pull request #115 from arvkevi/practical-k-means
add supplemental notebooks for practical k-means
2 parents ec3a4cf + 8a97e34 commit a293060

File tree

4 files changed

+1107
-0
lines changed

4 files changed

+1107
-0
lines changed

practical-k-means/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Practical K-Means Clustering in Python
2+
3+
The Jupyter notebooks in this directory follow the code examples in Real Python's [Practical K-Means Clustering in Python](https://realpython.com/practical-k-means-clustering-python/) article. The article is structured such that there are two main sections with code. The first section works with synthetic data. The second section starts when the TCGA cancer gene expression dataset is introduced.
4+
5+
## Getting Started
6+
7+
Follow the instructions below to get up and running with a Jupyter notebook and all the code from the article.
8+
9+
### Install Dependencies
10+
11+
These notebooks have dependencies. One way to install these dependencies is to use the Anaconda Python distribution.
12+
13+
```bash
14+
(base) $ conda install jupyter matplotlib numpy pandas seaborn scikit-learn
15+
(base) $ conda install -c conda-forge kneed
16+
```
17+
18+
You can also install all the requirements using `pip` and the `requirements.txt` file included in this directory.
19+
20+
```bash
21+
$ python3 -m pip install -r requirements.txt
22+
```
23+
24+
### Synthetic Data Notebook
25+
26+
Open the notebook that accompanies the sections of the article that work with synthetic data:
27+
28+
```bash
29+
(base) $ jupyter notebook practical-kmeans-synthetic.ipynb
30+
```
31+
32+
### Cancer Gene Expression Data Notebook
33+
34+
Open the notebook that accompanies the sections of the article that work with TCGA cancer gene expression data:
35+
36+
```bash
37+
(base) $ jupyter notebook practical-kmeans-cancer-gene-expression.ipynb
38+
```

practical-k-means/practical-k-means-cancer-gene-expression.ipynb

Lines changed: 482 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)