Skip to content

Conversation

@adam2392
Copy link
Collaborator

@adam2392 adam2392 commented Sep 21, 2022

Signed-off-by: Adam Li [email protected]

Changes proposed in this pull request:

  • implements a basic class for time-series graphs
  • implements a simulation module for basic Gaussian weight time-series graphs

This is a WIP, that relies on dynetx for the API for time-series graphs. However, we need to create a corresponding TimeSeriesMixedEdgeGraph that is similar to MixedEdgeGraph and also has the API of dynetx ts-graphs. This is mostly experimental and a draft to see what the API would look like, and would be used in conjunction with downstream packages to test ts-causal discovery functionality.

Before submitting

  • I've read and followed all steps in the Making a pull request
    section of the CONTRIBUTING docs.
  • I've updated or added any relevant docstrings following the syntax described in the
    Writing docstrings section of the CONTRIBUTING docs.
  • If this PR fixes a bug, I've added a test that will fail without my fix.
  • If this PR adds a new feature, I've added tests that sufficiently cover my new functionality.

After submitting

  • All GitHub Actions jobs for my pull request have passed.

Signed-off-by: Adam Li <[email protected]>
@adam2392 adam2392 marked this pull request as draft September 27, 2022 00:18
@adam2392 adam2392 changed the title [WIP] Experimental: A simulation module for time-series graphs and a class that relies on dynetx [WIP] Experimental: A simulation module for time-series graphs and a class that relies on only networkx Nov 3, 2022
@adam2392
Copy link
Collaborator Author

adam2392 commented Nov 21, 2022

@amit-sharma @bloebp just tagging you guys from today's discussion. The PR itself is still a mess/WIP, so I would restrict to just loosely looking at the time-series implementations to see if you spot any fundamental issues.

  • pywhy_graphs/classes/timeseries/base.py
  • pywhy_graphs/classes/timeseries/timeseries.py
  • pywhy_graphs/classes/timeseries/cpdag.py

and the corresponding unit tests to see how the time-series graphs should work in terms of an API. I'm flushing out minor details in the graph API, as I implement the dodiscover time-series algos.

cc: @robertness as relevant for dodiscover

@emrekiciman

@adam2392 adam2392 marked this pull request as ready for review January 5, 2023 19:47
Signed-off-by: Adam Li <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #21 (072325a) into main (5924622) will decrease coverage by 9.62%.
The diff coverage is 48.96%.

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
- Coverage   71.95%   62.33%   -9.63%     
==========================================
  Files          17       28      +11     
  Lines        1159     2079     +920     
  Branches      281      483     +202     
==========================================
+ Hits          834     1296     +462     
- Misses        259      686     +427     
- Partials       66       97      +31     
Impacted Files Coverage Δ
pywhy_graphs/classes/cpdag.py 73.46% <0.00%> (ø)
pywhy_graphs/classes/intervention.py 0.00% <0.00%> (ø)
pywhy_graphs/classes/networkxprotocol.py 0.00% <0.00%> (ø)
pywhy_graphs/simulate.py 0.00% <0.00%> (ø)
pywhy_graphs/viz/layout.py 10.71% <10.71%> (ø)
pywhy_graphs/algorithms/pag.py 74.15% <18.91%> (-9.10%) ⬇️
pywhy_graphs/config.py 38.23% <22.07%> (-49.77%) ⬇️
pywhy_graphs/algorithms/cyclic.py 77.77% <22.22%> (-14.12%) ⬇️
pywhy_graphs/viz/draw.py 36.84% <26.82%> (+1.95%) ⬆️
pywhy_graphs/classes/timeseries/mixededge.py 38.59% <38.59%> (ø)
... and 12 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
Signed-off-by: Adam Li <[email protected]>
@adam2392 adam2392 changed the title [WIP] Experimental: A simulation module for time-series graphs and a class that relies on only networkx [ENH, GRAPH] Experimental: A module for time-series graphs that relies on only networkx, and simulation and algorithms for time-series Jan 5, 2023
@adam2392
Copy link
Collaborator Author

adam2392 commented Jan 5, 2023

@adam2392 adam2392 merged commit 1b36ef8 into py-why:main Jan 5, 2023
@adam2392 adam2392 deleted the timeseries branch January 5, 2023 20:40
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

Successfully merging this pull request may close these issues.

2 participants