Giter VIP home page Giter VIP logo

Comments (6)

michalk8 avatar michalk8 commented on May 19, 2024

I'm not sure if i follow you correctly for probs in GPCCA - you want so sum up the lineages
for the main states except for rest, or do you want to do this only for some restricted cells?
If you want them sum up, I don't think it will work, see below (Alpha, Beta, Epsilon):
sum

Max seems to work better:
max

And for Alpha and Epsilon only:
ae

from cellrank.

michalk8 avatar michalk8 commented on May 19, 2024

Note that I haven't normalized so that it sums to 1, but with sum over the lineages, the picture is almost the same.
Maybe more robust way instead of max could be var - if a cell is in a metastable state, the variance of probs should be big (not uniform). Here's how it would look (now normalized to sum to 1):

var

If I did misunderstand, please correct me.

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

Thanks Mike, you are right, simply summing them up is not a good idea, as you show above.

What do you mean by max? Can you post your code?

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

@VolkerBergen @michalk8 should we go for root_states_probs and final_states_probs, or simple root_probs and final_probs? Simpler and shorter, no?

from cellrank.

michalk8 avatar michalk8 commented on May 19, 2024

Just for reference, I've plotted how P(A u B u C) = P(A) + P(B) + P(C) - P(A & B) - ... would look like (in code using the max as discussed). Code for reference:

from itertools import combinations

x = adata.obsm['to_final_states']
x = x['Alpha', 'Beta', 'Epsilon']

current = x.sum(1)
for c in combinations(range(x.shape[1]), 2):
    val = np.prod(x[:, c], axis=1)
    current -= val
current += np.prod(x, axis=1)

adata.obs['P(A u B u C)'] = current.X.squeeze()
adata.obs['diff'] = adata.obs['P(A u B u C)'] - adata.obs['final_states_probs']
scv.pl.scatter(adata, color=['final_states_probs', 'P(A u B u C)', 'diff'])

index

I'd keep it root_state_probs - it's a bit more descriptive and not much longer (+ we have to_final_states and final_states).

from cellrank.

Marius1311 avatar Marius1311 commented on May 19, 2024

Just for clarification: you compare P(XOR(A, B, C)) with using the max? Or how it final_states_probs computed above?

from cellrank.

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.