question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is Graphviz needed when using R's pcalg?

See original GitHub issue

My question is related to these explanations about the pcalg package in R. I am currently installing the required packages to run CDT’s graph-related PC.py. As the plotting is done using networkx, I figured Graphviz would not be needed.

Am I guessing correctly? Is there anything more I should know about these R requirements (say, about the path to the packages or some environment variables…)

Thanks, A.V

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Diviyan-Kalainathancommented, Oct 3, 2019

Hi, D2C is not required at the moment; I planned to add the algorithm, so I added the requirement in advance, but it isn’t used at the moment.

So maybe skip D2C. The R requirements are managed independently for each algorithm so no issues there. To run PC, you only need to have pcalg, kpcalg and RCIT:

and install RCIT from my fork repo, it contains an adaptation of the author’s code to make it work with CDT

from cdt.causality.graph.PC:

    def __init__(self, CItest="gaussian", method_indep='corr', alpha=0.01,
                 njobs=None, verbose=None):
        """Init the model and its available arguments."""
        if not (RPackages.pcalg and RPackages.kpcalg and RPackages.RCIT):
            raise ImportError("R Package (k)pcalg/RCIT is not available. "
                              "RCIT has to be installed from "
                              "https://github.com/Diviyan-Kalainathan/RCIT")

I should add in the documentation the required R packages for each algorithm.

Best, Diviyan

0reactions
Diviyan-Kalainathancommented, Oct 3, 2019

It should be done ! I will close this issue, don’t hesitate to reopen it if an issue arises.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pcalg: Methods for Graphical Models and Causal Inference
The main algorithms for causal structure learning are PC (for observational data without hidden variables), FCI and RFCI (for observational data with hidden ......
Read more >
Inferring functional connectivity in MRI using Bayesian ... - NCBI
We believe these results suggest a potentially alternative way to examine connectivity using BOLD fMRI data. But this method cannot be applied ......
Read more >
Installing pcalg
Rgraphviz is what pcalg relies on for drawing pictures of causal graphs. Its installation is somewhat tricky, so there is a README file,...
Read more >
Command Line | Graphviz
Specifies which default layout engine to use, overriding the default from ... If Graphviz is properly installed, it should not be needed, ...
Read more >
Tetrad Single HTML Manual - GitHub Pages
All analysis in Tetrad is performed graphically using a box paradigm, ... Tetrad can save graphs to XML, text, JSON, R and dot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found