bd2kccd / causal-cmd

16 stars 8 forks source link

causal-cmd v1.9.0 does not work with fas algorithm #97

Closed yasu-sh closed 1 year ago

yasu-sh commented 1 year ago

@kvb2univpitt @jdramsey I have just tried to build tetrad-lib after v.1.9.0 to expect the bug is corrected since Joe fixed the code. I confirmed working at self-build version of causal-cmd by mvn installing to local .m2 repository from the tetrad-lib 7.4.0+alpha.

Now I am satisfied with this code. But it must be welcome for others to enjoy new-release i.e. v1.9.1.

used commit for tetrad-lib 7.4.0 https://github.com/cmu-phil/tetrad/tree/5b5e2357fdcc7a16806b996a65062829522c58b0

java '-Duser.language=en' -jar causal-cmd-1.9.0-jar-with-dependencies.jar --algorithm fas --data-type continuous --dataset Retention.txt --delimiter tab --test sem-bic-test
java.lang.UnsupportedOperationException: Print to out for FAS is not used.
        at edu.cmu.tetrad.search.Fas.setOut(Fas.java:342)
        at edu.cmu.tetrad.algcomparison.algorithm.oracle.cpdag.Fas.search(Fas.java:64)
        at edu.pitt.dbmi.causal.cmd.tetrad.TetradRunner.lambda$runSearch$3(TetradRunner.java:214)

Originally posted by @yasu-sh in https://github.com/bd2kccd/causal-cmd/issues/89#issuecomment-1558662137

kvb2univpitt commented 1 year ago

@yasu-sh This is a tetrad issue. You need to modify the setOut method of the edu.cmu.tetrad.search.Fas class so that it doesn't throw any UnsupportedOperationException.

yasu-sh commented 1 year ago

@kvb2univpitt Okay. I am afraid I was not sure to make an issue even if tetrad-gui does not make errors for fas algortihm. So I thought I could open to report on causal-cmd repos.

I know that tetrad-lib needs to be updated for causal-cmd. Should I make an issue of tetrad repo for this?

jdramsey commented 1 year ago

@yasu-sh @kvb2univpitt This should work in the next release. It's fixed in development.

yasu-sh commented 1 year ago

@jdramsey @kvb2univpitt Thanks for replies. I've confirmed the fix working in devlopment's 4th commit after tetrad-lib 7.4.0 release. This issue will be closed when the next release is applied at causal-cmd by myself.

Ther former issue's main topic was solved already and the issue I reported was different. So I created this issue to be aware of this error. Other users can know this issue will be solved soon.

jdramsey commented 1 year ago

@yasu-sh Thanks :)

yasu-sh commented 1 year ago

@kvb2univpitt @jdramsey Today I've confirmed working on the self-build 1.10.0 version of TETRAD. Thank you very much! I believe that the the jar file will be uploaded at the sonartype site (currently up to 1.9 available yet) and tagged with causal-cmd 1.10 in git repository soon.

PS java '-Duser.language=en' -jar causal-cmd-1.10.0-jar-with-dependencies.jar --algorithm fas --data-type continuous --dataset Retention.txt --delimiter tab --test sem-bic-test Depth: 0 Depth: 1 Depth: 2

jdramsey commented 1 year ago

Great!

jdramsey commented 1 year ago

Yes I will do this soon; sorry, I got distracted today.