Skip to content

Commit

Permalink
Merge pull request #1704 from cmu-phil/development
Browse files Browse the repository at this point in the history
Merging 7.6.0 to master
  • Loading branch information
jdramsey authored Oct 31, 2023
2 parents ec26a51 + 9ff1c39 commit 5c1f196
Show file tree
Hide file tree
Showing 823 changed files with 6,705 additions and 3,975 deletions.
17 changes: 17 additions & 0 deletions INSTALL_APPLICATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Tetrad Application

This is a user interface tool that divides the analysis of causal problems into modular pieces which can be connected together to reflect how causal problems should ideally be analyzed. This can helpful as an educational tool or for data analysis for those who prefer a point and click interface.

Please use a recent Java JDK. See [Setting up Java for Tetrad](https://github.com/cmu-phil/tetrad/wiki/Setting-up-Java-for-Tetrad).

To download the Tetrad jar, please click the following link (which will always be updated to the latest version):

https://s01.oss.sonatype.org/content/repositories/releases/io/github/cmu-phil/tetrad-gui/7.5.0/tetrad-gui-7.5.0-launch.jar

You may be able to launch this jar by double-clicking the jar file name. However, on a Mac, this presents some security challenges. On all platforms, the jar may be launched at the command line (with a specification of the amount of RAM you will allow it to use) using this command:

java -Xmx[g]G -jar *-launch.jar

Here, [g] is the maximum number of Gigabytes you wish to allocate to the process.

See our Documentation for more details about the Tetrad application.
95 changes: 32 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,58 @@
# Tetrad

The Tetrad project makes algorithms available in Java for causal search and related tasks. Here is the [Dietrich College Carnegie Mellon University web page for Tetrad](https://www.cmu.edu/dietrich/news/news-stories/2020/august/tetrad-sail.html).
Here is the [Simon Initiative page for Tetrad](https://www.cmu.edu/simon/open-simon/toolkit/tools/learning-tools/tetrad.html).
Please visit our [Tetrad web page](https://sites.google.com/view/tetradcausal) for current links, a list of contributors, some history, documentation, descriptions, links for our various projects, Javadocs, and more.

Here is our [project web page](https://sites.google.com/view/tetradcausal) here with current links for artifacts, a list of contributors, and a bit of history.
## Tetrad Application

Here is the web page for the [Center for Causal Discovery](https://www.ccd.pitt.edu/), which also supports the latest version of Tetrad and Causal Command.
See out insructions for [Installing the Tetrad Application](https://github.com/cmu-phil/tetrad/blob/development/INSTALL_APPLICATION.md).

## Setting up Java
## Tetrad in Python

You will need to have Java on your machine. If you don't already have Java, or would like to update you Java to a more recent version, see our Wiki
article, [Setting up Java for Tetrad](https://github.com/cmu-phil/tetrad/wiki/Setting-up-Java-for-Tetrad).
We have a project, [py-tetrad](https://github.com/cmu-phil/py-tetrad), that allows you to incorporate arbitrary Tetrad code into a Python workflow. It's new, and the installation is still nonstandard, but it had a good response. This requires Python 3.5+. and Java JDK 9+.

For version 7.5.0, we will support separate builds for JDK 1.8 and JDK 17 (which will generally work for > 1.8). We have realized that there are a number of users who are unable to update from JDK 1.8. We are able to support these users, at least up through version 7.5.0, and perhaps into the future.
Please see our [description](https://sites.google.com/view/tetradcausal/tetrad-in-python

## Tetrad GUI Application
## Tetrad in R

This application breaks analysis of causal problems down into modular pieces that can be connected together following the way in which the problems should ideally be analyzed. We have found this to be useful as an educational tool, though it can also be used for causal analysis for those who don't want to analyze data or do simulations using a command-line interface.
We also have a project, [rpy-tetrad](https://github.com/cmu-phil/py-tetrad/tree/main/pytetrad/R), that allows you to incorporate _some_ Tetrad functionality in R. It's also new, and the installation for it is also still nonstandard, but has gotten good feedback. This requires Python 3.5+ and Java JDK 9+.

To use this, first determine which version of Java you are using by typing in a terminal window,
Please see our [description](https://sites.google.com/view/tetradcausal/tetrad-in-r?authuser=0).

```
java -version
```

Note that all Tetrad artifacts are downloadable from [Maven Central](https://s01.oss.sonatype.org/content/repositories/releases/io/github/cmu-phil/tetrad-gui/).
We have included artifacts compiled under JDK 1.8 and JDK 17, respectively. The Tetrad codebase uses language level 8 and so can be compiled under any version of Java from 1.8 up, but there are incompatibilities between version 1.8 and version > 1.8.

If your version of Java is 1.8 (version 8), please download Java using this link:

https://s01.oss.sonatype.org/content/repositories/releases/io/github/cmu-phil/tetrad-gui/7.4.0/tetrad-gui-7.5.0-jdk1.8-launch.jar.

If your version of the Java JDK is version 9 or higher, please download the Java launch jar using this link:
## Tetrad at the Command Line

https://s01.oss.sonatype.org/content/repositories/releases/io/github/cmu-phil/tetrad-gui/7.4.0/tetrad-gui-7.5.0-launch.jar.
In addition, we have a fully-developed tool, [Causal Command](https://github.com/bd2kccd/causal-cmd), that lets you run arbitrary Tetrad searches at the command likne.

This version is compiled under JDK version 17. If other compilations are needed, these can be generated by the user.
## Installallation for Programmers

You may be able to launch this jar by double clicking the jar file name, though on a Mac, this presents some [security challenges](https://github.com/cmu-phil/tetrad/wiki/Dealing-with-Tetrad-on-a-Mac:--Security-Issues). In any case, on all platforms, the jar may be launched at the command line (with a specification of the amount of RAM you will allow it to use) using this command:
Here's the git command to clone our project:

```
java -Xmx[g]G -jar *-launch.jar
git clone https://github.com/cmu-phil/tetrad
```

where [g] is the maximum number of Gigabytes you wish to allocate to the process.
Or, you can use GitHub's Code button.

## Command Line
If you have Maven installed, you can type the following to compile:

We have a tool, [Causal Command](https://github.com/bd2kccd/causal-cmd), that lets you run Tetrad algorithms at the command line. For Causal Command, we will assume you are using a version of Java greater than 1.8. Please give feedback if this is not adequate for your purposes.

## Python and R Integration

For Python integration, please see the [py-tetrad Python project](https://github.com/cmu-phil/py-tetrad), which shows how to integrate arbitrary Java code in the Tetrad project into a Python workflow using the [JPype Python project](https://jpype.readthedocs.io/en/latest/). The py-tetrad project will by default assume you are using a version of Java greater than 1.8, though it can easily be adjusted ot use version Java 1.8; for help with this, please give feedback.

Also, please see the [causal-learn Python package](https://causal-learn.readthedocs.io/en/latest/), translating some Tetrad algorithms into Python and adding some algorithms not in Tetrad, now part of the [py-why space](https://github.com/py-why)
```
mvn clean compile
```

For R integration, please see the [rpy-tetrad project](https://github.com/cmu-phil/py-tetrad/blob/main/pytetrad/R/), which gives R support through py-tetrad.
To run the unit tests:

## Documentation
```
mvn clean test
```

If you're new to Tetrad, here is a [Tutorial](https://rawgit.com/cmu-phil/tetrad/development/tetrad-gui/src/main/resources/resources/javahelp/manual/tetrad_tutorial.html). Also, here is
our [Manual](https://htmlpreview.github.io/?https:///github.com/cmu-phil/tetrad/blob/development/docs/manual/index.html). If you like to watch thought-provoking lectures, here are some [lectures on the Center for Causal Discovery site](https://www.ccd.pitt.edu/video-tutorials/).
To generate an executable jar:

In addition, here are our [Javadocs](https://www.phil.cmu.edu/tetrad-javadocs/7.5.0).
```
mvn clean package
```

## Install
The (launch) jar for the Tetrad Application will appear in the tetrad-gui/target directory. For links to our Python and R projects or our command line tool, please see our [Tetrad web page](https://sites.google.com/view/tetradcausal).

Here is our [GitHub URL](https://github.com/cmu-phil/tetrad). Also, here are some [instructions on how to set this project up in IntelliJ IDEA](https://github.com/cmu-phil/tetrad/wiki/Setting-up-Tetrad-in-IntelliJ-IDEA). You can run the Tetrad lifecycle package target and launch the "-launch" jar that is built in the target directory.
Here are some [instructions on how to set this project up in IntelliJ IDEA](https://github.com/cmu-phil/tetrad/wiki/Setting-up-Tetrad-in-IntelliJ-IDEA). You can run the Tetrad lifecycle package target and launch the "-launch" jar built in the target directory.

The project contains well-developed code in these packages:

Expand All @@ -76,25 +62,8 @@ The project contains well-developed code in these packages:

The tetrad-lib package contains the model code; the tetrad-gui package contains the view (GUI) code.

## Feedback

Please submit feedback using our [GitHub Issue Tracker](https://github.com/cmu-phil/tetrad/issues). We will try to the extent possible to resolve all reported issues before [releasing new versions of Tetrad](https://github.com/cmu-phil/tetrad/releases). This may involve moving items to our [Wish List](https://github.com/cmu-phil/tetrad/wiki/Current-Wish-List).

## Open Code
A similar method can be followed for installing in some other IDE.

All of our code is public and we welcome suggestions, especially suggestions that improve clarity or performance of our code, or suggestions that press us in new, helpful, directions.
## Problems? Comments?

If you're writing code using (or for!) Tetrad in either [Java](https://github.com/cmu-phil/tetrad) or [Python](https://github.com/cmu-phil/py-tetrad) (or R, which we're working toward!), thank you! Please contribute your amazing work, or publish and send us links to your papers. Please keep us abreast of how Tetrad could be improved for your applications; we will do what we can.

## Citation

Please cite as:

```
@inproceedings{ramsey2018tetrad,
title={TETRAD—A toolbox for causal discovery},
author={Ramsey, Joseph D and Zhang, Kun and Glymour, Madelyn and Romero, Ruben Sanchez and Huang, Biwei and Ebert-Uphoff, Imme and Samarasinghe, Savini and Barnes, Elizabeth A and Glymour, Clark},
booktitle={8th international workshop on climate informatics},
year={2018}
}
```
Please submit an issue in our [Issue Tracker](https://github.com/cmu-phil/tetrad/issues), which we assiduously read.
4 changes: 2 additions & 2 deletions data-reader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.cmu-phil</groupId>
<artifactId>tetrad</artifactId>
<version>7.5.0</version>
<version>7.6.0-SNAPSHOT</version>
</parent>
<!-- <groupId>io.github.cmu-phil</groupId>-->
<artifactId>data-reader</artifactId>
Expand All @@ -22,7 +22,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.11.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand Down
Loading

0 comments on commit 5c1f196

Please sign in to comment.