zhaofangyuan98 / SDMBench

25 stars 2 forks source link

A problem about metics ASW #7

Closed CocoGzh closed 4 months ago

CocoGzh commented 4 months ago

The ASW in SDMBench is calculated as follows: def compute_ASW(adata,pred_key,spatial_key='spatial'): d = squareform(pdist(adata.obsm[spatial_key])) return silhouette_score(X=d,labels=adata.obs[pred_key],metric='precomputed') It appears to be calculated by inputting the distances between spatial positions into sklearn.metrics.silhouette_score. However, I am unable to reproduce the results for DLPFC12, including those from the STAGATE model. The results obtained using this method mostly fall within the range of -0.1 to 0.1, which significantly deviates from the results reported in the article. This discrepancy is similar to the results in the tutorial. https://github.com/zhaofangyuan98/SDMBench/blob/main/Tutorial/tutorial.ipynb

yuanzhiyuan commented 4 months ago

Hi CocoGzh: Thanks for your interest! To keep consistent with other metrics, we have scaled ASW to 0-1, which was noted in our Method section.