Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCD not working #105

Open
KyuriP opened this issue Sep 30, 2022 · 11 comments
Open

CCD not working #105

KyuriP opened this issue Sep 30, 2022 · 11 comments

Comments

@KyuriP
Copy link

KyuriP commented Sep 30, 2022

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)
@ghost
Copy link

ghost commented Apr 4, 2023

@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
Copy link
Contributor

jdramsey commented Apr 4, 2023

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

cmu-phil/tetrad#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:

  • It looks like you're using discrete data (continuous=FALSE)? I can test it with discrete data to see if it works.
  • In any case, rcausal uses a very old version of Tetrad from like 6 years ago now? It would be better to use the most recent jar, though rjava was so buggy for people I've given up on it.

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
Copy link
Contributor

jdramsey commented Apr 4, 2023

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
Copy link
Contributor

jdramsey commented Apr 4, 2023

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

@jdramsey
Copy link
Contributor

jdramsey commented Apr 4, 2023

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
Copy link
Contributor

jdramsey commented Apr 4, 2023

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.

@ghost
Copy link

ghost commented Apr 4, 2023

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

@jdramsey
Copy link
Contributor

jdramsey commented Apr 4, 2023

Great! Thank you so much!

@jdramsey
Copy link
Contributor

jdramsey commented Apr 6, 2023

@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?

@ghost
Copy link

ghost commented Apr 6, 2023

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

@jdramsey
Copy link
Contributor

jdramsey commented Apr 6, 2023

It's no rush :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants