willtownes / nsf-paper

Nonnegative spatial factorization for multivariate count data
GNU Lesser General Public License v3.0
51 stars 11 forks source link

Some questions about the code #5

Closed Shuai1Wen closed 1 year ago

Shuai1Wen commented 1 year ago

Hi, I am trying to validate your other program results and understand the code in the 04_exploratory.ipy file in the sshippo folder under the scrna file. the code provided below: mpth = path.join(pth,"models/V5")

mpth = "/Volumes/Princeton_research_files/spatial-tx/scrna/sshippo/models/V5"

I noticed that in the code, there is a reference to a V5 model file, but I could not find any model file or V5 file under the sshippo folder in the GitHub code package you released. Could you please let me know how you obtained the V5 file?

0af3b3d59fc96dd39e67087b2097941 24642cf19f43b0ae1f3085c27d1d8bd

Best regards.

willtownes commented 1 year ago

Hi, thanks for your interest in the NSF paper. We didn't provide fitted models here because we stored them in pickle files that are not very transferable between different systems/ configurations/ etc. The notebooks in each dataset directory are meant to be run in order (01 first, then 02, etc). So once you have obtained the data and preprocessed it, you can fit whatever model you are interested in by referring to the spreadsheet under results/benchmark.csv. You can also generate this csv from scratch (or other combinations of model parameters). The V5 refers to the fact that 5% of the data is used for validation. So you can refer to the 03_benchmark notebook for examples of ways of fitting one or many models to the data, either on your local machine or on a SLURM-based cluster system. Alternatively, if you scroll down in the 04_exploratory notebook you can see that often the code will try to load a cached fitted model object from disk if it exists, but if that fails (ie if the model hasn't been fit yet), you can just fit it interactively.

Shuai1Wen commented 1 year ago

thank u very much!!!

Hi, thanks for your interest in the NSF paper. We didn't provide fitted models here because we stored them in pickle files that are not very transferable between different systems/ configurations/ etc. The notebooks in each dataset directory are meant to be run in order (01 first, then 02, etc). So once you have obtained the data and preprocessed it, you can fit whatever model you are interested in by referring to the spreadsheet under results/benchmark.csv. You can also generate this csv from scratch (or other combinations of model parameters). The V5 refers to the fact that 5% of the data is used for validation. So you can refer to the 03_benchmark notebook for examples of ways of fitting one or many models to the data, either on your local machine or on a SLURM-based cluster system. Alternatively, if you scroll down in the 04_exploratory notebook you can see that often the code will try to load a cached fitted model object from disk if it exists, but if that fails (ie if the model hasn't been fit yet), you can just fit it interactively.