Git Product home page Git Product logo

amortizedcausaldiscovery's People

Contributors

entropiceffect avatar loewex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

amortizedcausaldiscovery's Issues

question about the implementation

Thank you for the great work. I have some questions on your implementation.

  1. About causal graph
  • what is the difference between edges and prob in forward_pass_and_eval.py
  1. About loss function
  • what's the intuition behind the mechanism of acc and auroc in forward_pass_and_eval.py. I can understand that we need to uncover the latent causal graph, however, here the interaction pattern is the dense graph, which would violate the sparse mechanism in causality. Would you mind giving some hints on this point?

Thanks again for making the code available.
Your response will be highly appreciated.

Error running demo

I ran into an error when running the spring demo:
0) Running in Ubuntu 20.04, bash setup_dependencies.sh didn't run, so I simply followed the steps manually exactly as they appear in setup_dependencies.sh

  1. sklearn dependency wasn't found in environment ACD, so I added it manually by installing anaconda into the environment.
  2. python -m data.generate_dataset - this ran and populated the data directory, although I had to add --datadir to override the default to your home directory.
  3. python -m train --suffix _springs5 - this printed out some information, but then failed, with the message ending with
    File "/codebase/utils/data_loader.py", line 357 ..."temperatures" referenced before assignment.

If I'm reading the code properly, there is a combination of arguments that is skipping the assignment of temperature in data_loader, probably this:
args.load_temperatures = False
args.cuda = False

I tried to figure out where args.cuda is assigned, but I don't see it yet. Is there a recommended set of python -m options for this situation? My system has CUDA GPUs and I've used them in PyTorch before, but maybe the environment isn't working correctly?

Cannot validate the experiment for netsim

when running

python -m train --suffix netsim

it will fail at the validation stage:

Traceback (most recent call last):
File "/Users/bytedance/opt/anaconda3/envs/py36/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Users/bytedance/opt/anaconda3/envs/py36/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/bytedance/Desktop/total/work/Codebase/Bizops/Causal_Discovery/codebase/train.py", line 238, in
best_epoch, epoch = train()
File "/Users/bytedance/Desktop/total/work/Codebase/Bizops/Causal_Discovery/codebase/train.py", line 56, in train
val_losses = val(epoch)
File "/Users/bytedance/Desktop/total/work/Codebase/Bizops/Causal_Discovery/codebase/train.py", line 91, in val
for batch_idx, minibatch in enumerate(valid_loader):
TypeError: 'NoneType' object is not iterable

kl_categorical_uniform returns negative value

kl_div = preds * (torch.log(preds + eps))

The kl_categorical_uniform method in utils.py returns a negative value. This does not seem like the expected result since in optimisation its absolute value increases. Moreover, the KL divergence should be always greater than 0 theoretically. Taking into account that the prior is uniform, shouldn't this modification be more appropriate?
kl_div = preds * (torch.log(preds + eps) - np.log(1/num_edge_types))

Do you enforce that the predicted causal graphs are the same for all samples in the Netsim experiment?

Hi,

After reading your code, it seems that the predicted causal graphs for different samples can be different even in the Netsim experiment. The edge_accuracy is computed using the predicted causal graphs (which can be different for different samples) and the ground-truth causal graphs (which are the same for all samples). Could you please let me know if I am correct or not?

It would be great to hear from you.

Graph visualization

I tried running the code with netsim data. I am unable to find the causal discovery graph which is estimated by ACD

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.