snap-stanford / GEARS

GEARS is a geometric deep learning model that predicts outcomes of novel multi-gene perturbations
MIT License
189 stars 38 forks source link

KeyError: 'val' #56

Closed yanwuanxin closed 5 months ago

yanwuanxin commented 5 months ago

Hi, thanks for sharing. I encountered the following error:

b80ee0de2f44c4405f0b19dce31ab14

my adata.obs: image

yhr91 commented 5 months ago

This probably means there's an error in your split. How many perturbations are there in your dataset and which split did you pick

yanwuanxin commented 5 months ago

condition/ cell_type variable as follow: image

I randomly created the condition variable, I'm not quite sure about condition variable

yanwuanxin commented 5 months ago

pert_data.prepare_split(split = 'simulation', seed = 1) I'm not sure how to choose split parameter either

yhr91 commented 5 months ago

There area few issues here:

Those are too few perturbation categories for the model to perform the default 'simulation' split. I also wouldn't recommend training GEARS on only a single perturbation under any split.

Lastly, the current version of GEARS is not set up to predict effects across multiple cell types as this is not accounted for in the model inputs.

yanwuanxin commented 5 months ago

Thank you very much, i will try to modify the adata according to your suggestions.