theislab / cpa

The Compositional Perturbation Autoencoder (CPA) is a deep generative framework to learn effects of perturbations at the single-cell level. CPA performs OOD predictions of unseen combinations of drugs, learns interpretable embeddings, estimates dose-response curves, and provides uncertainty estimates.
BSD 3-Clause "New" or "Revised" License
83 stars 17 forks source link

Model Training Error #36

Open Coaasim opened 11 months ago

Coaasim commented 11 months ago

Hi! Thanks for this great drug perturbation prediction approach. I am trying to apply the CPA model on my RNA-Seq data but unfortunately while training the data with my data I get the error: "ValueError: Input X contains NaN. NearestNeighbors does not accept missing values encoded as NaN natively. For supervised learning, you might want to consider sklearn.ensemble.HistGradientBoostingClassifier and Regressor which accept missing values encoded as NaNs natively. Alternatively, it is possible to preprocess the data, for instance by using an imputer transformer in a pipeline or drop samples with missing values. See https://scikit-learn.org/stable/modules/impute.html You can find a list of all estimators that handle NaN values at the following page: https://scikit-learn.org/stable/modules/impute.html#estimators-that-handle-nan-values"

When I checked my data again for NaNs, I couldn't find any missing values. Do you have any idea what could be wrong? How important is the introduction of adata.uns or the split columns in the adata.obs? I would be grateful for any help!