if params["n_pcs"] > 0 and adata.X.shape[1] > params["n_pcs"]:
sett.m(0, "preprocess using PCA with", params["n_pcs"], "PCs")
sett.m(0, "--> avoid this by setting n_pcs = 0")
dpca = pca(adata, n_comps=params["n_pcs"])
X = dpca["Y"]
else:
X = adata.X
// params for sklearn
After Change
if n_pcs > 0 and adata.X.shape[1] > n_pcs:
sett.m(0, "preprocess using PCA with", n_pcs, "PCs")
sett.m(0, "--> avoid this by setting n_pcs = 0")
X = pca(adata.X, n_comps=n_pcs)
adata["X_pca"] = X
else:
X = adata.X
// params for sklearn