Git Product home page Git Product logo

Comments (13)

amit-sharma avatar amit-sharma commented on August 17, 2024 1

That's great to hear @jaron-lee . Adding you.

from pywhy-graphs.

adam2392 avatar adam2392 commented on August 17, 2024 1

Ah yeah, that pattern should be sufficient. Note: networkx/networkx#6216

I'm going to submit a PR to patch this edge-case behavior. We should also follow a similar design.

from pywhy-graphs.

adam2392 avatar adam2392 commented on August 17, 2024 1

Ah I see. Yeah that is a bug forsure. Let's raise the issue w/ them and see what they say. For now, on our end we can return None in the edge case that they are d-connected.

from pywhy-graphs.

jaron-lee avatar jaron-lee commented on August 17, 2024

I will take a stab at this next! BTW is there a way I can self assign an issue?

from pywhy-graphs.

adam2392 avatar adam2392 commented on August 17, 2024

Will look into it!

from pywhy-graphs.

adam2392 avatar adam2392 commented on August 17, 2024

Turns out GH only has this issue if you're a collaborator. No idea why.

Would you be interested in becoming an official collaborator on the repo?

Would just want your input and code reviews whenever relevant.

from pywhy-graphs.

jaron-lee avatar jaron-lee commented on August 17, 2024

Yeah I'd be happy to become an official collaborator, could probably learn some things on reviewing code.

from pywhy-graphs.

jaron-lee avatar jaron-lee commented on August 17, 2024

@adam2392 so it seems that I'll need to implement an anterior function on the way to implementing the m-separator function. Is there a strategy more generally for genealogical functions on MixedEdgeGraphs, in terms of where to implement them? I could just put it in m_separation.py but was not sure.

from pywhy-graphs.

jaron-lee avatar jaron-lee commented on August 17, 2024

I found the answer to my question in networkx.algorithms.d_separated - the template there is clear to follow (minimal d-separator functions implemented in the same file).

from pywhy-graphs.

jaron-lee avatar jaron-lee commented on August 17, 2024

Regarding that last comment Adam, I notice that minimal_d_separator doesn't seem to handle the edge case when you have e.g. A -> B and there is in fact no separator at all between A and B. Is this intended?

Van der Zander handle this by returning a special value (maybe in Python we could return None), which is probably what I'll do in minimal_m_separator.

from pywhy-graphs.

adam2392 avatar adam2392 commented on August 17, 2024

I think it may be fixed in networkx/networkx#6427, where we first check if in fact {z} is a d-separator for {x} and {y} at all. If it is, then we proceed to check its minimality. Can we do the same thing for m-separation?

from pywhy-graphs.

jaron-lee avatar jaron-lee commented on August 17, 2024

networkx/networkx#6427 only addresses this in the verification function is_minimal_d_separated but not the constructor function minimal_d_separator, as I understand.

In fact,

>>> import networkx as nx
>>> nx.__version__
'3.0'
>>> G = nx.DiGraph()
>>> G.add_edge("A", "B")
>>> nx.minimal_d_separator(G, "A", "B")
set()

but clearly the empty set does not d-separate A and B in that graph. Might this be a bug in networkx?

from pywhy-graphs.

adam2392 avatar adam2392 commented on August 17, 2024

Xref: networkx/networkx#6430

from pywhy-graphs.

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.