scvi-tools icon indicating copy to clipboard operation
scvi-tools copied to clipboard

Allow custom train/test/val splits

Open adamgayoso opened this issue 1 year ago • 0 comments

Right now we split the data randomly be a user specified proportion. We should provide api access to allow any custom splits.

A workaround right now is to train on a custom anndata and set train size to 1.0, and then use the fact that most model methods allow the ability to process held out anndatas.

E.g.,

vae = scvi.model.SCVI(train_adata)
vae.train(train_size=1.0)
vae.get_elbo(test_adata)

however, you can't leverage things like early stopping this way.

adamgayoso avatar Oct 24 '22 01:10 adamgayoso