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

Create sphinx documentation for simplify, join, insert, and powerset #8

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

hmhummel
Copy link
Collaborator

Also, added equivalency of each parameter to Tikka's causaleffect functions. Added detail to parameter documentation.

…sert, and powerset. Still need function name changes and examples.
…es, and described equivalency of each parametery to `causaleffect` functions. Added more detail to parameter documentation to increase clarity.
@hmhummel hmhummel requested a review from djinnome August 19, 2024 20:35
@hmhummel hmhummel self-assigned this Aug 19, 2024
Copy link

@djinnome djinnome Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @hmhummel Sphinx will display the mathematical formulas such as $P(J|D)$ and $P(V|C) := P(V_k |C_k)$ in latex if you put a :math: before the backquotes, for example:

:math:`P(V|C) := P(V_k | C_k)`

Note that I included underscores in Vk and Ck so that they would be subscripted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, awesome!! Love this & will implement in the next commit — thanks

@hmhummel hmhummel changed the title Replaced capital letters with more descriptive variable names in join Create sphinx documentation for simplify, join, insert, and powerset Aug 19, 2024
@hmhummel
Copy link
Collaborator Author

Documentation for causaleffectpy

I began to document causaleffectpy functions in a similar fashion to causaleffect so that this can eventually be integrated into y0 and used as a reference to write the probabilistic simplification algorithms.

I used sphinx to document 4 functions in .rst files, and used this sphinx tutorial with the make html command to generate html files.

Unit testing for causaleffectpy

Unit tests for all functions still need to be created with pytest using the 3 vignettes/test cases from causal.effect on CRAN: 1st with unobserved confounders, 2nd with pruning & fractions, and 3rd with simplest graph possible (no unobserved confounders). For reference, here are the causal.effect unit test files using the testthat R package: test_case_1, test_case_2, and test_case_3. @djinnome recommended using causaleffectpy to help create the unit tests rather than y0.

Needs work:

  • simplify - created sphinx documentation and html file. Changed names of functions to y0 but not sure if they're right. Needs an example/unit test
  • join - created sphinx documentation and html file. Changed names of functions to y0 but not sure if they're right. Needs an example/unit test
  • insert - created sphinx documentation and html file. Changed names of functions to y0 but not sure if they're right. Needs an example/unit test
  • powerset - created sphinx documentation and html file. No related y0 functions.
  • deconstruct
  • causal.effect — might not be needed, as there is already an identification algorithm written for y0
  • dSep
  • wrap.dSep
  • parse.expression
  • factorize
  • probability
  • get.expression
  • etc

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