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.12k stars 197 forks source link

[BUG] Function or algorithm name + Bug summary #99

Closed Angela446-lgtm closed 3 years ago

Angela446-lgtm commented 3 years ago
- python version (spyder 3.7).
- No GPUs available.

I am trying to apply the PC algorithm to my data( 7 patients, 9 columns). I runn a boostraping with replacement. Then, when i change from gaussian to CItest='hsic_perm' I am getting an error. line 224, in launcg_R_script raise RuntimeError("RProcessError ") from None RuntimeError: RProcessError bootstrapping = []

sim = 2 for i in range(sim): x_boot = resample(x,replace =True,random_state = i) #bootstrapping with replacement x_boot = pd.DataFrame(x_boot, columns= x.columns) boots.append(x_boot) obj = PC(CItest='hsic_perm', method_indep='corr', alpha=0.01, njobs=None, verbose=None)

The predict() method works without a graph, or with a

#directed or undirected graph provided as an input
output = obj.predict(x_boot)    #No graph provided as an argument
nx.draw_networkx(output, font_size=8)
plt.show()

Thank you, Angela