FenTechSolutions / CausalDiscoveryToolbox

Package for causal inference in graphs and in the pairwise settings. Tools for graph structure recovery and dependencies are included.
https://fentechsolutions.github.io/CausalDiscoveryToolbox/html/index.html
MIT License
1.13k stars 199 forks source link

Errors when using SID in cdt.metrics #78

Closed chengweiclarence closed 4 years ago

chengweiclarence commented 4 years ago

Hi!

When running SID by the given example, an error occurred:

ImportError Traceback (most recent call last)

in 5 tar = np.triu(randint(2, size=(10, 10))) 6 pred = np.triu(randint(2, size=(10, 10))) ----> 7 SID(tar, pred) c:\users\sx-liang\appdata\local\programs\python\python37\lib\site-packages\cdt\metrics.py in SID(target, pred) 271 """ 272 if not RPackages.SID: --> 273 raise ImportError("SID R package is not available. Please check your installation.") 274 275 true_labels = retrieve_adjacency_matrix(target) ImportError: SID R package is not available. Please check your installation. But when running SHD, everything goes well. Could you tell me how to fix it? Thanks!
diviyank commented 4 years ago

Hello ! Is the R package SID is available in your R installation ? Try in R:

install.packages("BiocManager")
BiocManager::install(c("CAM", "SID", "bnlearn", "pcalg", "kpcalg", "D2C"))

Best, Diviyan

chengweiclarence commented 4 years ago

Hello ! Is the R package SID is available in your R installation ? Try in R:

install.packages("BiocManager")
BiocManager::install(c("CAM", "SID", "bnlearn", "pcalg", "kpcalg", "D2C"))

Best, Diviyan

Hi! I have successfully solved this problem by your instruction. Thanks very much!

diviyank commented 4 years ago

Great, I'll close the issue!