diff --git a/5-Clustering/1-Visualize/README.md b/5-Clustering/1-Visualize/README.md index cbff4726ca..b862b45a36 100644 --- a/5-Clustering/1-Visualize/README.md +++ b/5-Clustering/1-Visualize/README.md @@ -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() ``` diff --git a/5-Clustering/2-K-Means/README.md b/5-Clustering/2-K-Means/README.md index 18a08fdd63..5fe6eb7490 100644 --- a/5-Clustering/2-K-Means/README.md +++ b/5-Clustering/2-K-Means/README.md @@ -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')