Skip to content

Commit

Permalink
Merge pull request #739 from mfruhner/correlation-patch
Browse files Browse the repository at this point in the history
Fix multiple function calls in Chapter 5
  • Loading branch information
BethanyJep authored May 31, 2024
2 parents 4b72f67 + 890cf47 commit 91ee7b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions 5-Clustering/1-Visualize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Note, when the top genre is described as 'Missing', that means that Spotify did
1. Do a quick test to see if the data correlates in any particularly strong way:

```python
corrmat = df.corr()
corrmat = df.corr(numeric_only=True)
f, ax = plt.subplots(figsize=(12, 9))
sns.heatmap(corrmat, vmax=.8, square=True)
```
Expand Down Expand Up @@ -300,7 +300,7 @@ Are these three genres significantly different in the perception of their dancea
1. Create a scatter plot:

```python
sns.FacetGrid(df, hue="artist_top_genre", size=5) \
sns.FacetGrid(df, hue="artist_top_genre", height=5) \
.map(plt.scatter, "popularity", "danceability") \
.add_legend()
```
Expand Down
2 changes: 1 addition & 1 deletion 5-Clustering/2-K-Means/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Previously, you surmised that, because you have targeted 3 song genres, you shou

```python
plt.figure(figsize=(10,5))
sns.lineplot(range(1, 11), wcss,marker='o',color='red')
sns.lineplot(x=range(1, 11), y=wcss, marker='o', color='red')
plt.title('Elbow')
plt.xlabel('Number of clusters')
plt.ylabel('WCSS')
Expand Down

0 comments on commit 91ee7b6

Please sign in to comment.