py-why / causal-learn

Causal Discovery in Python. It also includes (conditional) independence tests and score functions.
https://causal-learn.readthedocs.io/en/latest/
MIT License
1.04k stars 174 forks source link

Which method can generate weighted edges? #148

Open creamiracle opened 8 months ago

creamiracle commented 8 months ago

Hey, just wanna know which method can generate weighted edges for different datasets. I know lingam can do this, but it assume the linear relation between columns, so is there any method else can do this?

thanks.

kunwuz commented 8 months ago

Hey, if the weight is just for some type of coefficient but not really something 'causal', perhaps regression-based methods can do it (e.g., DirectLiNGAM). I'm not sure what methods could output 'causal strength' (or even its definition) though. Any suggestion would be great.

creamiracle commented 8 months ago

Hey, if the weight is just for some type of coefficient but not really something 'causal', perhaps regression-based methods can do it (e.g., DirectLiNGAM). I'm not sure what methods could output 'causal strength' (or even its definition) though. Any suggestion would be great.

I found a paper https://txyz.ai/paper/1a2dbe68-ae85-4d1d-8ed8-1dedc44b1b2f which use a NN method called DAG-GNN, and it mentioned that "With this causal structure learning method, we can get a weighted DAG (G) which represent causal relations between metrics" And my dataset maybe not linear and no confounders, so the LinGAM maybe not the choice?(I'm not sure really).

kunwuz commented 8 months ago

Yea, these (DAG structure learning methods) could produce a weighted DAG, but the weight does not necessarily correspond to the 'causal strength'. I'm not aware of any formal definition of 'causal strength' in causal discovery yet.

And you are right, lingam does not come with theoretical guarantees on nonlinear data. CAM-UV extends it to the additive noise model but still not completely general.

creamiracle commented 8 months ago

Yea, these (DAG structure learning methods) could produce a weighted DAG, but the weight does not necessarily correspond to the 'causal strength'. I'm not aware of any formal definition of 'causal strength' in causal discovery yet.

And you are right, lingam does not come with theoretical guarantees on nonlinear data. CAM-UV extends it to the additive noise model but still not completely general.

Thanks, so if I wanna use weight to express "causal strength", what should I do? maybe do causal inference like T-learner or sth else? My situation wanna use CI-based method to find which column influence the label and how "strength" it influences. That really confuses me a lot. BTW, do you know the SEM? I found that SEM maybe can calculate the weight.

Best regards.