Skip to content

Causal Recourse Blog Post - JSoC - #13

Merged
pat-alt merged 15 commits into
mainfrom
9-causal-recourse-blog-post
Sep 24, 2024
Merged

pat-alt merged 15 commits into
mainfrom
9-causal-recourse-blog-post

Conversation

@JorgeLuizFranco

Copy link
Copy Markdown
Contributor

added introduction , overview, contributions, math and start implemen…

@JorgeLuizFranco JorgeLuizFranco linked an issue Sep 13, 2024 that may be closed by this pull request
@pasq-cat

Copy link
Copy Markdown
Member

hi @JorgeLuizFranco can you tell me how did you use the bib file with the .qmd notebook?

@JorgeLuizFranco

Copy link
Copy Markdown
Contributor Author

hi @JorgeLuizFranco can you tell me how did you use the bib file with the .qmd notebook?

Hey @pasq-cat, in fact for me it is not rendering the .bib also locally, but I am following the standard I used in the CE.jl documentation.

@JorgeLuizFranco

Copy link
Copy Markdown
Contributor Author

hi @JorgeLuizFranco can you tell me how did you use the bib file with the .qmd notebook?

Hey @pasq-cat, in fact for me it is not rendering the .bib also locally, but I am following the standard I used in the CE.jl documentation.

@pasq-cat I think it worked for me now including : bibliography: bib.bib in the header of the .qmd file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this file can be removed?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM although I think the conclusion is still missing here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

LGTM although I think the conclusion is still missing here?

Yes, @pat-alt. It is not finished yet, but I have already pushed because I was not understanding why the graphplot is not rendering. Should I insert an image instead?

variables::Vector{String}
coefficients::Vector{Vector{Float64}}
residuals::Vector{Vector{Float64}}
dag::DiGraph

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure where the DiGraph type comes from, so this code currently fails (have set to eval: false)

@JorgeLuizFranco

Copy link
Copy Markdown
Contributor Author

@pat-alt @mschauer could you review?

@pat-alt pat-alt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you again @JorgeLuizFranco - great job!

I have edited this a little bit and added one small comment, but otherwise this looks good to me and I'm happy to merge once @mschauer has had a look.


This equation shows how each counterfactual variable $x_{SCF_i}$ is generated as a linear combination of the factual inputs $x_{F_j}$ based on the causal effects matrix, with an intercept term $b_i$ added for each variable.

One can note that the `orphan` nodes, that is, the nodes that do not have parents in the DAG, are going to be equal to the intercept term $\mathcal{b}_\hat{o}$. The intuition behind this is that when we do the linear regression, variables that have no causal parents are just equal to the unconditional mean of the variable, i.e, we get $x_{SCF_\hat{o}} = \mathbb{E}(x_\hat{o})$. Because of this, in some cases a better understanding of the regression is needed, so the residuals are also part of the SCM structure,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does orphan need to be orphan here? Implies that his is an object in the code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Does orphan need to be orphan here? Implies that his is an object in the code.

Indeed, going to remove this.

@pat-alt

pat-alt commented Sep 24, 2024

Copy link
Copy Markdown
Member

@JorgeLuizFranco I think Moritz might be out-of-office at the moment, so I'll go ahead an merge this now, because I would love to see it published. @mschauer still happy to make any adjustments later, of course.

@pat-alt
pat-alt merged commit 07075c0 into main Sep 24, 2024
@mschauer

Copy link
Copy Markdown

Sorry, I am in a very busy week. Thank you for covering for me.

@JorgeLuizFranco

Copy link
Copy Markdown
Contributor Author

Thank you @pat-alt and @mschauer 🙌

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.

Causal recourse blog post

4 participants