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

7.3.2. #1583

Merged
merged 69 commits into from
Apr 12, 2023
Merged

7.3.2. #1583

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
a16f0c9
Updating to 7.3.0
jdramsey Mar 21, 2023
4bf609c
Update README.md
jdramsey Mar 21, 2023
1cc686a
Update README.md
jdramsey Mar 21, 2023
20dfa23
Update README.md
jdramsey Mar 21, 2023
df6c1b0
Update README.md
jdramsey Mar 22, 2023
9fdee7f
Update Boss.java
bja43 Mar 22, 2023
406c65b
Merge pull request #1561 from cmu-phil/bja43-patch-1
jdramsey Mar 22, 2023
1aa4968
Added option to SEM Estimator editor to not display means.
jdramsey Mar 22, 2023
f5cfc7c
Added option to SEM Estimator editor to not display means.
jdramsey Mar 22, 2023
bd1711f
Added option to SEM Estimator editor to not display means.
jdramsey Mar 22, 2023
f922c53
Merge pull request #1562 from cmu-phil/estimator_editor_fix
jdramsey Mar 22, 2023
f8e0199
Changed version to 7.3.1-SNAPSHOT.
jdramsey Mar 22, 2023
5805da2
Update README.md
jdramsey Mar 23, 2023
32ba9f7
Update README.md
jdramsey Mar 23, 2023
2443086
Set up BOSS and SP again for boostrapping.Also, fixed the structure p…
jdramsey Mar 23, 2023
0b5585f
Set up BOSS and SP again for boostrapping.Also, fixed the structure p…
jdramsey Mar 23, 2023
6c2a258
Update README.md
jdramsey Mar 23, 2023
46b9382
Update README.md
jdramsey Mar 23, 2023
bfb3754
Merge pull request #1564 from cmu-phil/estimator_editor_fix
jdramsey Mar 23, 2023
6aff5de
added graphToLavaan
bja43 Mar 25, 2023
c4484f5
Added Bryan's lavaan graph save option.
jdramsey Mar 25, 2023
41a0a37
Merge pull request #1567 from cmu-phil/lavaaaaan
jdramsey Mar 25, 2023
c08da7a
Update README.md
jdramsey Mar 25, 2023
e5c8ee2
Update README.md
jdramsey Mar 25, 2023
ed34845
Update README.md
jdramsey Mar 25, 2023
e777524
Update README.md
jdramsey Mar 25, 2023
84a1567
Update README.md
jdramsey Mar 25, 2023
ea1f67a
Update README.md
jdramsey Mar 25, 2023
0fc4a40
Update README.md
jdramsey Mar 25, 2023
9724b12
some light refactoring of GST and TS
bja43 Mar 25, 2023
6cb9dc5
Blocking .DS_STOREs in .gitignore
jdramsey Mar 26, 2023
4d5cfeb
Merge pull request #1568 from cmu-phil/ts_w_gst_refactor
jdramsey Mar 26, 2023
a40f855
Update README.md
jdramsey Mar 26, 2023
50811d9
Update README.md
jdramsey Mar 26, 2023
c162566
fixed issue in graphToLavaan
bja43 Mar 27, 2023
98cf13b
Merge pull request #1570 from cmu-phil/tolavaaaaaaaaaaaan_issue
jdramsey Mar 27, 2023
3f5f61a
Update README.md
jdramsey Mar 29, 2023
cb02e07
Update README.md
jdramsey Mar 29, 2023
0a0ddfc
Blocking .DS_STOREs in .gitignore
jdramsey Apr 1, 2023
7e879cb
Cleaning up code for SvarFci and SvarGfci.
jdramsey Apr 2, 2023
1d2a312
Cleaning up code for SvarFci and SvarGfci.
jdramsey Apr 2, 2023
6fe1346
Capitalized algorithm wrapper names and deleted some deprecated ones.
jdramsey Apr 2, 2023
ccafbb4
Merge pull request #1573 from cmu-phil/svar_gfci_cleanup
jdramsey Apr 2, 2023
65e62b0
Boss w/ tiered knowledge maybe fixed?
bja43 Apr 2, 2023
22f6373
Boss w/ tiered knowledge maybe fixed?
bja43 Apr 2, 2023
a26012c
Merge pull request #1574 from cmu-phil/permutation_bes
jdramsey Apr 2, 2023
0d961d8
Re-adding CCD as non-experimental per user requests.
jdramsey Apr 4, 2023
47ff8f0
Update README.md
jdramsey Apr 4, 2023
f62710e
Update README.md
jdramsey Apr 4, 2023
9192d6e
Re-adding CCD as non-experimental per user requests.
jdramsey Apr 4, 2023
40799a9
Update README.md
jdramsey Apr 4, 2023
8fa5fd6
Removing FAS concurrent option because of instability.
jdramsey Apr 6, 2023
9d529d4
Removing FAS concurrent option because of instability.
jdramsey Apr 6, 2023
1c4d4d7
Removing FAS concurrent option because of instability.
jdramsey Apr 6, 2023
14c4884
Turned bootstrapping back on for bootstrapping
jdramsey Apr 6, 2023
72dd46d
Using FastMath.log for GSquareTest
jdramsey Apr 6, 2023
9cb7cf2
Using FastMath.log for GSquareTest
jdramsey Apr 6, 2023
501ef23
Added a unit test to make sure knowledge is passed into all the basic…
jdramsey Apr 8, 2023
03b7ee2
Merge pull request #1580
jdramsey Apr 8, 2023
8152994
Added a unit test to make sure knowledge is passed into all the basic…
jdramsey Apr 8, 2023
cd34113
Fixed unit tests.
jdramsey Apr 8, 2023
083623f
Fixed unit tests.
jdramsey Apr 10, 2023
6cbc0be
Fixed unit tests.
jdramsey Apr 10, 2023
d398507
Added an interface, ReturnsBootstrapGraphs, and implemented in severa…
jdramsey Apr 11, 2023
3552507
Typo.
jdramsey Apr 12, 2023
99c2e33
Fixing a bootstrapping for GRaSP-FCI.
jdramsey Apr 12, 2023
3964c82
Merge pull request #1582 from cmu-phil/joework2023_4_11
kvb2univpitt Apr 12, 2023
49e199f
Setting version to 7.3.2.
jdramsey Apr 12, 2023
df7a40e
Merge branch 'master' into development
jdramsey Apr 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ tetrad-gui.log
/testboostrap/CalibrationConstraintBased/RFCI/RandomGraph-Vars20-Edges80-Cases1000-BS5-H0.1-a0.001/PAG_v20_e80_c1000_b5_-1.txt
/testboostrap/CalibrationConstraintBased/RFCI/RandomGraph-Vars20-Edges80-Cases1000-BS5-H0.1-a0.001/probs_v20_e80_c1000_b5_-1.txt
/target/

.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ of contributors, and a bit of history.
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.

All of our code is public and we welcome suggestions, especially suggestions that improve clarity or performance of our code.
## Setting up Java

You will need to set up Java on your machine. For setting up Java, see our Wiki artible, [Setting up Java for Tetrad](https://github.com/cmu-phil/tetrad/wiki/Setting-up-Java-for-Tetrad).

## Tetrad GUI Application

To download the current jar you can use to launch the Tetrad GUI,
click [here](https://s01.oss.sonatype.org/content/repositories/releases/io/github/cmu-phil/tetrad-gui/7.3.0/tetrad-gui-7.3.0-launch.jar).
Please delete any old ones you're not using.
To download the current jar you can use to launch the Tetrad GUI, click this link:

The application will work on all major platforms once a recent version of the Java JRE/JCK is installed, certainly *
*_greater than version 1.8 (version 8)_**. We find that the most
recent [Corretto JRE/JDK](https://aws.amazon.com/corretto/?filtered-posts.sort-by=item.additionalFields.createdDate&filtered-posts.sort-order=desc)
with long term support (LTS) works well cross-platform.
https://s01.oss.sonatype.org/content/repositories/releases/io/github/cmu-phil/tetrad-gui/7.3.0/tetrad-gui-7.3.0-launch.jar.

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
Expand All @@ -40,14 +37,16 @@ where [g] is the maximum number of Gigabytes you wish to allocate to the process
We have a tool, [Causal Command](https://github.com/bd2kccd/causal-cmd), that lets you run Tetrad algorithms at the
command line.

## Python Integration
## Python and R Integration

For Python integration, please see our (still new) [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/).

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).
Tetrad algorithms into Python and adding some algorithms not in Tetrad, now part of the [py-why space](https://github.com/py-why)

We added [a method to use Tetrad algorithms in R via py-tetrad](https://github.com/cmu-phil/py-tetrad/blob/main/pytetrad/R/). This is work in progress.

## Documentation

Expand All @@ -58,6 +57,8 @@ our [Manual](https://htmlpreview.github.io/?https:///github.com/cmu-phil/tetrad/
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/).

In addition, here are our [Javadocs](https://www.phil.cmu.edu/tetrad-javadocs/7.3.0/lib/).

## Install

All artifacts are published in
Expand All @@ -83,3 +84,22 @@ 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

All of our code is public and we welcome suggestions, especially suggestions that improve clarity or performance of our code.

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 if you are doing 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}
}
```
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.3.0</version>
<version>7.3.2</version>
</parent>
<!-- <groupId>io.github.cmu-phil</groupId>-->
<artifactId>data-reader</artifactId>
Expand Down Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.4.1</version>
<version>2.14.2</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.cmu-phil</groupId>
<artifactId>tetrad</artifactId>
<version>7.3.0</version>
<version>7.3.2</version>
<packaging>pom</packaging>

<name>Tetrad Project</name>
Expand Down
2 changes: 1 addition & 1 deletion tetrad-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.cmu-phil</groupId>
<artifactId>tetrad</artifactId>
<version>7.3.0</version>
<version>7.3.2</version>
</parent>

<artifactId>tetrad-gui</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package edu.cmu.tetradapp.editor;

import edu.cmu.tetrad.algcomparison.algorithm.Algorithm;
import edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.PagSamplingRfci;
import edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.RfciBsc;
import edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.PAG_SAMPLING_RFCI;
import edu.cmu.tetrad.algcomparison.algorithm.oracle.pag.RFCI_BSC;
import edu.cmu.tetrad.algcomparison.utils.TakesIndependenceWrapper;
import edu.cmu.tetrad.algcomparison.utils.UsesScoreWrapper;
import edu.cmu.tetrad.annotation.Score;
Expand Down Expand Up @@ -74,7 +74,7 @@ public void addToPanel(GeneralAlgorithmRunner algorithmRunner) {
Parameters parameters = algorithmRunner.getParameters();

// Hard-coded parameter groups for Rfci-Bsc
if (algorithm instanceof RfciBsc) {
if (algorithm instanceof RFCI_BSC) {
// Phase one: PAG and constraints candidates Searching
String title = algorithm
.getClass().getAnnotation(edu.cmu.tetrad.annotation.Algorithm.class).name();
Expand Down Expand Up @@ -107,7 +107,7 @@ public void addToPanel(GeneralAlgorithmRunner algorithmRunner) {
this.mainPanel.add(createSubPanel(title, params, parameters));
this.mainPanel.add(Box.createVerticalStrut(10));

} else if (algorithm instanceof PagSamplingRfci) {
} else if (algorithm instanceof PAG_SAMPLING_RFCI) {
String title = algorithm.getClass().getAnnotation(edu.cmu.tetrad.annotation.Algorithm.class).name();

Set<String> params = new LinkedHashSet<>();
Expand All @@ -118,13 +118,13 @@ public void addToPanel(GeneralAlgorithmRunner algorithmRunner) {

title = "RFCI Parameters";
params.clear();
params.addAll(PagSamplingRfci.RFCI_PARAMETERS);
params.addAll(PAG_SAMPLING_RFCI.RFCI_PARAMETERS);
this.mainPanel.add(createSubPanel(title, params, parameters));
this.mainPanel.add(Box.createVerticalStrut(10));

title = "Probabilistic Test Parameters";
params.clear();
params.addAll(PagSamplingRfci.PROBABILISTIC_TEST_PARAMETERS);
params.addAll(PAG_SAMPLING_RFCI.PROBABILISTIC_TEST_PARAMETERS);
this.mainPanel.add(createSubPanel(title, params, parameters));
this.mainPanel.add(Box.createVerticalStrut(10));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public GraphFileMenu(GraphEditable editable, JComponent comp, boolean saveOnly)
save.add(new SaveGraph(editable, "R...", SaveGraph.Type.r));
save.add(new SaveGraph(editable, "Dot...", SaveGraph.Type.dot));
save.add(new SaveGraph(editable, "PCALG...", SaveGraph.Type.pcalg));
save.add(new SaveGraph(editable, "lavaan...", SaveGraph.Type.lavaan));

addSeparator();
add(new SaveComponentImage(comp, "Save Graph Image..."));
Expand Down
19 changes: 18 additions & 1 deletion tetrad-gui/src/main/java/edu/cmu/tetradapp/editor/SaveGraph.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class SaveGraph extends AbstractAction {
*/
private final Type type;

public enum Type {text, xml, json, r, dot, pcalg}
public enum Type {text, xml, json, r, dot, pcalg, lavaan}

public SaveGraph(GraphEditable graphEditable, String title, Type type) {
super(title);
Expand Down Expand Up @@ -147,6 +147,23 @@ public void actionPerformed(ActionEvent e) {
try {
String text = GraphPersistence.graphToPcalg(graph);

PrintWriter out = new PrintWriter(file);
out.println(text);
Preferences.userRoot().put("fileSaveLocation", file.getParent());
out.close();
} catch (FileNotFoundException e1) {
e1.printStackTrace();
throw new RuntimeException("Not a directed graph.", e1);
} catch (IllegalArgumentException e1) {

// Probably not a directed graph.
JOptionPane.showMessageDialog(getGraphEditable().getWorkbench(), e1.getMessage());
}
} else if (this.type == Type.lavaan) {
File file = EditorUtils.getSaveFile("graph", "lavaan.txt", parent, false, this.title);
try {
String text = GraphPersistence.graphToLavaan(graph);

PrintWriter out = new PrintWriter(file);
out.println(text);
Preferences.userRoot().put("fileSaveLocation", file.getParent());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public double getCorrelationPValue() {
}

private double fisherz(double r) {
return 0.5 * FastMath.sqrt(getSampleSize() - 3.0) * (log(1.0 + r) - log(1.0 - r));
return 0.5 * FastMath.sqrt(getSampleSize() - 3.0) * (FastMath.log(1.0 + r) - FastMath.log(1.0 - r));
}

/**
Expand Down
Loading