def test_expectile_sets_correct_distribution_and_link(self, adata_cflare: AnnData): g = GAM(adata_cflare, expectile=0.2) g.prepare(adata_cflare.var_names[0], "0") g.fit() g.predict() g.confidence_interval() assert isinstance(g.model, ExpectileGAM) assert g.y_test is not None assert g.conf_int is not None
def test_custom_grid(self, adata_cflare: AnnData): g = GAM(adata_cflare, grid={"lam": [0.1, 1, 10]}) g.prepare(adata_cflare.var_names[0], "0") g.fit() g.predict() g.confidence_interval() assert g._grid is not None assert g._grid == {"lam": [0.1, 1, 10]} assert g.y_test is not None assert g.conf_int is not None
def test_default_grid(self, adata_cflare: AnnData): g = GAM(adata_cflare, grid="default") g.prepare(adata_cflare.var_names[0], "0") g.fit() g.predict() g.confidence_interval() assert g._grid is not None assert not isinstance(g._grid, str) assert g.y_test is not None assert g.conf_int is not None