Skip to content

MEFISTO with Poisson likelihood #2

Open
@willtownes

Description

@willtownes

Hi, congratulations on this awesome method! I am interested in trying MEFISTO with the Poisson likelihood. I have been following the tutorial for the Visium brain data, but it seems to run into numerical problems after the first few iterations. Here is the code I have been using:

ent = entry_point()
ent.set_data_options(use_float32=True)
ad.raw = ad
ent.set_data_from_anndata(ad, use_raw=True, likelihoods="poisson")
ent.set_model_options(factors=4)
ent.set_train_options(iter=ne)
ent.set_covariates([ad.obsm["spatial"]], covariates_names=["imagerow", "imagecol"])
ent.set_smooth_options(sparseGP=True, frac_inducing=M/ad.n_obs,
                       start_opt=10, opt_freq=10)
ent.build()
%time ent.run()

At iteration 12 the ELBO becomes nan and after iteration 19 it says "Optimising sigma node..." then raises an exception:
UnboundLocalError: local variable 'best_lidx' referenced before assignment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions