Closed alexanderlewis99 closed 1 month ago
ss = np.zeros(16) k = 0 for i in np.arange(2,18): ss[k] = np.round(acdc.get_opt.GS_metric_value(adata, n_clusts=i),7) k+=1
import seaborn as sns
df = pd.DataFrame({"n_clusts":np.arange(2,18),"ss":ss})
plt.figure(figsize=(8, 6)) sns.scatterplot(x='n_clusts', y='ss', data=df, color='blue', s=100) # Scatter plot plt.plot(df['n_clusts'], df['ss'], color='blue') # Line plot
plt.xlabel('Number of Clusters') plt.ylabel('SS (Silhouette Score)')
plt.show()
Resolved by commit c3f5c57
ss = np.zeros(16) k = 0 for i in np.arange(2,18): ss[k] = np.round(acdc.get_opt.GS_metric_value(adata, n_clusts=i),7) k+=1
import seaborn as sns
df = pd.DataFrame({"n_clusts":np.arange(2,18),"ss":ss})
plt.figure(figsize=(8, 6)) sns.scatterplot(x='n_clusts', y='ss', data=df, color='blue', s=100) # Scatter plot plt.plot(df['n_clusts'], df['ss'], color='blue') # Line plot
Add labels and title
plt.xlabel('Number of Clusters') plt.ylabel('SS (Silhouette Score)')
Show the plot
plt.show()