bd2kccd / r-causal

R Wrapper for Tetrad Library
35 stars 19 forks source link

CCD not working #105

Open KyuriP opened 2 years ago

KyuriP commented 2 years ago

I am trying to run CCD but it throws me an error below.

library(stringr)
library(rJava)
library(rcausal)
data("audiology")
ccd <- ccd(df=audiology, continuous = FALSE, depth = -1, verbose = TRUE)
#> Error in ccd(df = audiology, continuous = FALSE, depth = -1, verbose = TRUE): unused argument (continuous = FALSE)
roys8001 commented 1 year ago

@KyuriP Same issue here. Did you come up with any solution? I am failing to even run it in the departmental cluster which has linux system. I am personally using MAC.

jdramsey commented 1 year ago

@KyuriP I was just talking with @roys8001 about this.

https://github.com/cmu-phil/tetrad/issues/1577

I had taken CCD out of the interface because of inaccuracy, not because it doesn't function, but to be fair if there's interest I'll put it back in. It may be buggy in the version that's in rcausal, which is very old, though:

I'm trying to set up a new way of running Tetrad algorithms in R that goes through Python, which I'm hoping will be more stable. The setup is perhaps more annoying, but I've given it here for a Mac. This is new as of yesterday and doesn't include CCD yet, but if you want to test out the install procedure and give me feedback, I would be most grateful.

https://github.com/cmu-phil/py-tetrad/blob/main/pytetrad/R/REAMDE.md

I was going to add some tests for discrete data today and add CCD (at @roys8001 's request).

jdramsey commented 1 year ago

I just put CCD back in the Tetrad interface (on my local branch of the repo) and tested it on some discrete data and it worked. So I don't think discrete data is throwing it off. Let me add it to the py-tetrad R gadget and see if I can get it to work with some discrete data. I'm working on this currently so it should be available later today.

jdramsey commented 1 year ago

CCD is now available for continuous data in py-tetrad for R and is working for my example.

jdramsey commented 1 year ago

By the way, the CCD output graph has underlinings, which I'll have to find a way to print in R (maybe, a method, 'print_underlinings'). Also, Thomas never worked out knowledge for the CCD algorithm, so if you set any knowledge before running CCD, it will complain.

jdramsey commented 1 year ago

We have some offers to test the instructions for this on our end as well, in case you want to wait and see if they change. Also, maybe the whole setup could be done automatically in a Docker container in VSC--we'll look into it.

roys8001 commented 1 year ago

Sure. But I shall try to run it too and drop in some queries if I got struck at some step.

jdramsey commented 1 year ago

Great! Thank you so much!

jdramsey commented 1 year ago

@roys8001 Were you able to get https://github.com/cmu-phil/py-tetrad/tree/main/pytetrad/R installed, and were you able to use CCD with it?

roys8001 commented 1 year ago

Hi Dr Ramsey, something urgent came up. I shall try again with this from Friday.

jdramsey commented 1 year ago

It's no rush :)