Merge pull request #739 from mfruhner/correlation-patch

Fix multiple function calls in Chapter 5
pull/744/head
Pikachú 1 year ago committed by GitHub
commit 91ee7b6aa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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)
```
@ -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()
```

@ -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')

Loading…
Cancel
Save