Comments (6)
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
from causaldiscoverytoolbox.
Hi,
I don't know if graphviz are in the requirements of the pcalg package. If not, we don't need it; the installation process of all packages can be quite a hassle.
The file /install-deps/install-dependencies.sh
does includes the installation commands for debian based systems:
#!/bin/bash
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
apt-get -q install r-base -y --allow-unauthenticated
apt-get -q install libssl-dev -y
apt-get -q install libgmp3-dev -y --allow-unauthenticated
apt-get -q install git -y
apt-get -q install build-essential -y --allow-unauthenticated
apt-get -q install libv8-3.14-dev -y --allow-unauthenticated
apt-get -q install libcurl4-openssl-dev -y --allow-unauthenticated
Rscript -e 'install.packages(c("V8","sfsmisc","clue","randomForest","lattice","devtools","MASS"),repos="http://cran.us.r-project.org")'
Rscript -e 'source("http://bioconductor.org/biocLite.R"); biocLite(c("CAM", "SID", "bnlearn", "pcalg", "kpcalg", "D2C"))'
Rscript -e 'library(devtools); install_github("cran/momentchi2"); install_github("Diviyan-Kalainathan/RCIT")'
Rscript -e 'install.packages(c("sparsebn"),repos="http://cran.us.r-project.org")'
An easy alternative would be to use the docker images.
Best regards,
Diviyan
from causaldiscoverytoolbox.
Hi,
Sadly, as I was manually installing the requirements (which you list here: c("CAM", "SID", "bnlearn", "pcalg", "kpcalg", "D2C")
), the following situation appeared:
Warning messages:
1: package ‘Rgraphviz’ is not available (for R version 3.6.1)
2: In install.packages(c("randomForest", "gRbase", "lazy", "infotheo", :
installation of package ‘gRbase’ had non-zero exit status
> install.packages(pkgs=pkf, type="source", repos=NULL)
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
ERROR: dependencies ‘gRbase’, ‘Rgraphviz’ are not available for package ‘D2C’
* removing ‘/usr/local/lib/R/site-library/D2C’
Mind you, I have R 3.6 because R 3.4.4 did not have mvtnorn
which was needed for another dependency.
Will try with BiocManager (biocLite doesn't work with R>=3.5 I think)
Thanks for the help, will update if I have additional problems
Update: I do have a debian-based system (ubuntu 18.04 LTS) , but mvtnorm
implies R >=3.5 , and apparently D2C
is archived and depends on Rgraphviz
.
BiocManager can't find D2C as it is archived, same for install.packages()
> BiocManager::install("D2C")
Bioconductor version 3.9 (BiocManager 1.30.4), R 3.6
Installing package(s) 'D2C'
Warning message:
package ‘D2C’ is not available (for R version 3.6.1)
Final question: If my only goal is to run the PC algorithm on Sachs with different versions (heuristics) of KCI-test, would I need to have D2C and therefore Rgraphviz?
Thank you, I will continue the installation process tomorrow,
Regards,
A.V
from causaldiscoverytoolbox.
Back to work, was delighted to find this reply!
This will save me tons of time, thanks a lot :)
from causaldiscoverytoolbox.
No problem :) ! I will improve the documentation in the next version
from causaldiscoverytoolbox.
It should be done ! I will close this issue, don't hesitate to reopen it if an issue arises.
from causaldiscoverytoolbox.
Related Issues (20)
- [fileNotFoundError: [Errno 2]] cdt.causality.graph.LiNGAM + No such file or directory: 'C:\\anaconda\\lib\\site-packages\\cdt\\utils\\R_templates\\test_import.R' HOT 1
- GIES targets and target.index parameter needs to be exposed HOT 2
- [BUG] orient_graph removes some of the edges
- [Question] What does the causal score in the pairwise model really indicate?
- ImportError: R Package (k)pcalg/RCIT is not available. HOT 3
- [BUG] CGNN run() Wrong way to calculate the score HOT 1
- FloatingPointError: The system is too ill-conditioned for this solver. The system is too ill-conditioned for this solver HOT 1
- Help! HOT 1
- Can PC algorithm be used for causal discovery under mixed types of data?
- ImportError: R Package pcalg is not available
- [BUG] autoset_settings() fails with MIG GPU
- CCDr algorithm execution error
- CCDr Algorithm + estimate.dag in R Script, Error in weights HOT 3
- CGNN running time is too long
- [BUG] SAM + torch/numpy casting issue
- SAM, Running in parallel
- SAM, Generative loss explodes during validation phase
- [BUG] CGNN error: module 'networkx' has no attribute 'adj_matrix'
- [BUG] SAM: Probabilities/Edge-Weights greater than 1 from method predict if not fullbatch
- [BUG] Docker image for ARM64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from causaldiscoverytoolbox.