Git Product home page Git Product logo

Comments (4)

kstreet13 avatar kstreet13 commented on July 21, 2024

Hi @galicae ,

Thank you for the detailed report! I have not yet been able to reproduce the error, but I have a few thoughts. The quickest workaround might be to use the diagonal (rather than full) covariance structure. To do this, you will need to pass this function to getLineages as the dist.fun argument.

Additionally (and I'm just guessing here), it looks like the coordinates you're passing in from the diffusion map are all quite small, between -0.04 and 0.04. So the computational issues may be related to handling very small numbers. If this is the case, you might be able to solve this by multiplying the coordinates by a large constant (100 to 1000?).

Also, did you mean to attach the file sim98_slingshot_destiny_log_k1? In your code, you import sim98_destiny_log_k1 and it looks like that is a diffusion map object (as opposed to a SlingshotDataSet).

from slingshot.

galicae avatar galicae commented on July 21, 2024

Hey Kelly,

Wow that was fast :) thanks for taking the time!

I think there is merit in the "multiply by 100/1000" guess/solution, but it doesn't explain why adding noise to the diffusion components solves the problem. You are right about the file - I misclicked D: it was supposed to be `sim98_destiny_log_k" (no "1"s though), the diffusion map on which coordinates I want to calculate the lineage. I am going to update the original post.

Also, thanks for the pointer to use the diagonal instead of the full covariance. Seems cleaner than the random noise idea. Will try that too.

cheers,
Niko

EDIT: updated!

from slingshot.

kstreet13 avatar kstreet13 commented on July 21, 2024

Hey Niko,

Thanks! I'm now able to reproduce the error and I think the problem may have to do with some of the clusters being highly linear. I tried to invert the sums of all pairwise combinations of cluster covariance matrices and found that certain clusters were more "problematic" than others and most of these clusters were highly linear. For example, here are all ten dimensions of Cluster 4:
image
This could explain why adding some Gaussian noise solves the problem (and multiplying by a large constant does not).

I'm not super familiar with Mclust, but I think you might be able to avoid this by either decreasing the range of possible clusters (I got 47, which seems like a lot, but it's also not unreasonable for 9500 cells) or by adjusting the modelNames parameter, which affects cluster shape.

Best,
Kelly

from slingshot.

galicae avatar galicae commented on July 21, 2024

Thanks a lot for your time! Your suggestions more or less answer my question. Would be happy to revisit if you decide to include clustering in future slingshot versions ๐Ÿ˜‰

best,
Niko

from slingshot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.