PC-stable using Tetrad command line interface

76 views
Skip to first unread message

Mandar Chaudhary

unread,
Aug 26, 2015, 7:09:44 PM8/26/15
to Tetrad Users Group
Hi,

I have been working with the PC-stable algorithm in Tetrad using the GUI but I need to run experiments on hundreds of datasets for my experiments.
It is very tedious to use the GUI to run the algorithm on the datasets since I have to drag and drop each time, so I explored the command line interface of Tetrad and followed the Dr. Ramsey's instructions mentioned here.
I found that PC-stable is not included in the list of algorithms, I would like to know if the latest versions of Tetrad command line interface have included the implementation of the PC-stable algorithm.
If not, then can you suggest a plausible work-around to run the algorithm on several datasets without using the GUI.

Thank you!
Mandar

Joseph Ramsey

unread,
Aug 26, 2015, 7:33:10 PM8/26/15
to tetrad-us...@googlegroups.com
Mandar,

I can add PcStable to the command line gadget, though I don't know when; my to do list is pretty long. But I'll try to get to it soon. If not, remind me.

Joe

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-gr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

Mandar Chaudhary

unread,
Aug 26, 2015, 7:51:48 PM8/26/15
to Tetrad Users Group
Thank you for the quick response Dr. Ramsey.
I looked into the TetradCmd.java file that is included in the source code of Tetrad 5.1.0-9 version and found command line parameters in the java file, including an option to run PC-stable algorithm. 
Although Tetrad 5.1.0-9 is for the GUI version I have, I tried to run it with the command line version using tetradcmd-5.1.0-10.jar file as follows,

java -jar $path/Tetrad/tetradcmd-5.1.0-10.jar -data $f -datatype continuous -algorithm pc.stable -depth -1 -significance 0.05 -graphxml $i.xml -verbose

and found that the program runs successfully and outputs a final graph. However, when I looked into the output since I had the verbose option, I found that the algorithm is still specified as PC (please see the attachment, file.out.pc.stable).
Another interesting observation is that this output was different from the final graph of the PC algorithm (also attached in file.out.pc).
Is this a feasible way to run PC-stable algorithm using the command line interface?

Regards,
Mandar


On Wednesday, 26 August 2015 19:33:10 UTC-4, Joe wrote:
Mandar,

I can add PcStable to the command line gadget, though I don't know when; my to do list is pretty long. But I'll try to get to it soon. If not, remind me.

Joe
On Wed, Aug 26, 2015 at 7:09 PM, Mandar Chaudhary <mandar.c...@gmail.com> wrote:
Hi,

I have been working with the PC-stable algorithm in Tetrad using the GUI but I need to run experiments on hundreds of datasets for my experiments.
It is very tedious to use the GUI to run the algorithm on the datasets since I have to drag and drop each time, so I explored the command line interface of Tetrad and followed the Dr. Ramsey's instructions mentioned here.
I found that PC-stable is not included in the list of algorithms, I would like to know if the latest versions of Tetrad command line interface have included the implementation of the PC-stable algorithm.
If not, then can you suggest a plausible work-around to run the algorithm on several datasets without using the GUI.

Thank you!
Mandar

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
file.out.pc.stable
file.out.pc

Joseph Ramsey

unread,
Aug 26, 2015, 7:56:24 PM8/26/15
to tetrad-us...@googlegroups.com
It's printing out PC instead of PC-Stable--I'll correct that. But you can use it--it will just print out "PC".

On Wed, Aug 26, 2015 at 7:51 PM, Mandar Chaudhary <mandar.c...@gmail.com> wrote:
Thank you for the quick response Dr. Ramsey.
I looked into the TetradCmd.java file that is included in the source code of Tetrad 5.1.0-9 version and found command line parameters in the java file, including an option to run PC-stable algorithm. 
Although Tetrad 5.1.0-9 is for the GUI version I have, I tried to run it with the command line version using tetradcmd-5.1.0-10.jar file as follows,

java -jar $path/Tetrad/tetradcmd-5.1.0-10.jar -data $f -datatype continuous -algorithm pc.stable -depth -1 -significance 0.05 -graphxml $i.xml -verbose

and found that the program runs successfully and outputs a final graph. However, when I looked into the output since I had the verbose option, I found that the algorithm is still specified as PC (please see the attachment, file.out.pc.stable).
Another interesting observation is that this output was different from the final graph of the PC algorithm (also attached in file.out.pc).
Is this a feasible way to run PC-stable algorithm using the command line interface?

Regards,
Mandar


On Wednesday, 26 August 2015 19:33:10 UTC-4, Joe wrote:
Mandar,

I can add PcStable to the command line gadget, though I don't know when; my to do list is pretty long. But I'll try to get to it soon. If not, remind me.

Joe
On Wed, Aug 26, 2015 at 7:09 PM, Mandar Chaudhary <mandar.c...@gmail.com> wrote:
Hi,

I have been working with the PC-stable algorithm in Tetrad using the GUI but I need to run experiments on hundreds of datasets for my experiments.
It is very tedious to use the GUI to run the algorithm on the datasets since I have to drag and drop each time, so I explored the command line interface of Tetrad and followed the Dr. Ramsey's instructions mentioned here.
I found that PC-stable is not included in the list of algorithms, I would like to know if the latest versions of Tetrad command line interface have included the implementation of the PC-stable algorithm.
If not, then can you suggest a plausible work-around to run the algorithm on several datasets without using the GUI.

Thank you!
Mandar

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-gr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-gr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mandar Chaudhary

unread,
Aug 26, 2015, 11:13:29 PM8/26/15
to Tetrad Users Group
Thank you! That got it working but I observed that the output graph comes out different when I run PC-stable multiple times on the same dataset.
I am not sure what might be causing this as PC-stable is a deterministic algorithm.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mandar Chaudhary

unread,
Aug 27, 2015, 6:52:38 PM8/27/15
to Tetrad Users Group
Joe,

I tried changing the version of the command line program for Tetrad from tetradcmd-5.1.0-10 to tetradcmd-5.1.0-7 and ran PC-stable multiple times on the same dataset. Most of the times the output graph was same but I did find changes in some of the graphs. 
Can you please explain what could be causing this issue?
Thanks.

Joseph Ramsey

unread,
Aug 27, 2015, 7:30:32 PM8/27/15
to tetrad-us...@googlegroups.com
According to Colombo and Maathuis, orientation is not guaranteed to be stable across runs, even of the adjacency step is. (See their article.) That's the most likely candidate, I think.

To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-gr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-gr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-gr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mandar Chaudhary

unread,
Aug 29, 2015, 1:58:41 AM8/29/15
to Tetrad Users Group
Thank you Joe! I will look into the article you suggested.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Joseph D. Ramsey
Special Faculty and Director of Research Computing
Department of Philosophy
143 Baker Hall
Carnegie Mellon University
Pittsburgh, PA 15213

jsph....@gmail.com
Office: (412) 268-8063
http://www.andrew.cmu.edu/user/jdramsey

--
You received this message because you are subscribed to the Google Groups "Tetrad Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tetrad-users-group+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mandar Chaudhary

unread,
Sep 1, 2015, 6:11:12 PM9/1/15
to Tetrad Users Group
Hi Joe,

I looked into the article Colombo, D. M., and H. Marloes. "A modification of the PC algorithm yielding order-independent skeletons." as you suggested, and found that the orientation is not stable if the order of variables changes. However, there shouldn't be a change in the orientation if the order remains the same. I find that the output graph changes if I run PC-stable multiple times on the same dataset without changing the variable order. The output of PC remains the same nevertheless. Is there anything I'm missing? I am using tetradcmd-5.1.0-7.jar for my experiments just in case if this information helps.
Thanks!
Reply all
Reply to author
Forward
0 new messages