Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Similarity Kernel Computation #144

Closed
Merlin2333 opened this issue Jun 30, 2024 · 1 comment
Closed

Similarity Kernel Computation #144

Merlin2333 opened this issue Jun 30, 2024 · 1 comment

Comments

@Merlin2333
Copy link

Hello,

I was wondering if it makes sense to replace x_i vector of gene expression with some other lower dimension loadings (such as PCs) in the step of computing the similarity kernel K(x_i, x_j)? Essentially, I was worried that using gene expressions will suffer from the curse of dimensionality. Not sure if it make sense here, but I would appreciate it if you can provide some explanations.

Thanks!

@katosh
Copy link
Collaborator

katosh commented Jul 1, 2024

Hello @Merlin2333,

Thank you for the inquiry. The kernel is computed by the palantir.utils.compute_kernel function. Under the hood this function uses the anndata.obsm["X_pca"] representation to compute the kernel, and it will fail if no PCA is present. However, it also takes an pca_key argument that allows you to specify any other representation stored in anndata.obsm. You can technically use this to play around. Note, that the function specifically computes diffusion distance based on the Euclidean distances in the given representation, and other representations might change the downstream interpretation of the Palantir result. I would be intrigued to hear back about what you find out!

@katosh katosh closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants