Git Product home page Git Product logo

tetrad's Introduction

Tetrad

Please visit our [Tetrad web page) for current links, a list of contributors, some history, documentation, descriptions, links for our various projects, Javadocs, and more.

Tetrad Application

See our instructions for Installing the Tetrad Application.

Tetrad in Python

We have a project, 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 17+.

Tetrad in R

We also have a project, rpy-tetrad, 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 17+.

Please see our description.

Tetrad at the Command Line

In addition, we have a fully developed tool, Causal Command, that lets you run arbitrary Tetrad searches at the command line.

Installallation for Programmers

Here's the git command to clone our project:

git clone https://github.com/cmu-phil/tetrad

Or, you can use GitHub's Code button.

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

mvn clean compile

To run the unit tests:

mvn clean test

To generate an executable jar:

mvn clean package

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.

Here are some instructions on how to set this project up 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:

  • tetrad
  • pitt
  • tetradapp

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

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

Problems? Comments?

Please submit an issue in our Issue Tracker, which we assiduously read.

tetrad's People

Contributors

adambrodie avatar ajsedgewick avatar amurrayw avatar bja43 avatar chirayukong avatar daulatojha17 avatar ddclark avatar dependabot[bot] avatar dmalinsk avatar ekummerfeld avatar espinoj avatar fattaneh avatar harryhoch avatar jdramsey avatar kgrover avatar khaes-kth avatar kvb2univpitt avatar lizziesilver avatar lockmatrix avatar ps7z avatar vbcwonderland avatar yasu-sh avatar yuanzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tetrad's Issues

How can I measure program runtime?

Hi,

I am using "tetradcmd-5.1.0-10.jar" in Windows by making batch file to run for multiple input and output files. I am searching causal variables from my input data using FCI algorithm.

How can I measure the program runtime? I like to measure the program runtime for each search in each input data set, because some input data sets have very complex models.

Thank you,
Sanghoon

Matrix Toolkits for Java (MTK) doesn't play well with 64 bit Windows

If imports starting with no.uib.cipr.matrix are commented out, the problem code is put in red in IntelliJ. Classes affected are IndTestHsic, KernelUtils, Ling, Lingam.

The compiled classes seem to run OK, but the relevant tests break when run in Maven.

I think we should support 64 bit Windows. If so, need to translate this matrix algebra to a different library.

Problem with loading data sets

Dear Experts,

I’m trying to load 12 text files into the data box and after I press "load all”, the loading log remains blank. After pressing save, I see all 12 tabs but they all have the same data (subject 1’s data set, as opposed to each subject’s unique data). I am using version 5.2.1-3 on mac. Has anyone else experienced this? I would greatly appreciate any advice.

Thanks,
Eleni

Error message while running TetradCmd with PC algorithm.

Hi,

I was running TetradCmd in Windows for PC algorithm, but I got an error message. Please see below.


java -jar tetradcmd-5.1.0-10.jar -data input.txt -datatype discrete -algorithm pc -depth -1 -significance 0.01

Exception in thread "main" java.lang.IllegalStateException: No algorithm was specified.
at edu.cmu.tetradapp.TetradCmd.runAlgorithmTetradCmd.java:508
at edu.cmu.tetradapp.TetradCmd.TetradCmd.java:80
at edu.cmu.tetradapp.TetradCmd.mainTetrad.java:945


When I ran it for FCI or other algorithms, I didn't get any error message. Only PC algorithm is giving error message. Even if I got the error message while running for PC algorithm, I could get an output. When I compared the PC output and other algorithm outputs, they are different so I think PC algorithm is working and the error message doesn't seem critical. But, I am not sure whether PC algorithm is working appropriately. Could you explain what the error message means and if I can fix it.

Thank you,
Sanghoon

Recode FastICA.

See Issue #60 and Issue #61. Need to translate the newest version of FastICA into Java.

Reduce the size of the ejar.

Setting minimize to true for shade resulted in problems with loading the configuration in the Tetrad GUI. However, setting it to false increases the size of the ejar from 16G to 30+G. Need to find a way to split the difference. Maybe leave out specific jars from the build.

Build failure due to test error

Attempting to build project, while running tests will get the following error:

Tests in error:
    test8(edu.cmu.tetrad.test.TestStandradizedSem): non symmetric matrix: the difference between entries at (1,2) and (2,1) is larger than 0

This results in build failure

Difference between 'tetradcmd-5.1.0-10' and 'lib-tetrad-5.3.0.20151113.150857-1-tetradcmd.jar'

Hi,
I was using "tetradcmd-5.1.0-10.jar" in windows batch. I like to make sure if the results of pc or fci search algorithm between "tetradcmd-5.1.0-10" vs. "lib-tetrad-5.3.0-20151113.150857-1-tetradcmd.jar" are different in terms of graph edges? When I ran both tetrad cmd, I got 32 edges by 'tetradcmd-5.1.0-10.jar', but I got just 27 edges by 'lib-etrad-5.3.0-20151113.150857-1-tetradcmd.jar'. Also, I found that some edge directions and interacting nodes are different between two results. For example,
SNP_A-2127756_3 --- SNP_A-1839049_2 vs. SNP_A-2127756_3 <->SNP_A-1999524_1.

Do you recommend to use the latest version of TETRAD cmd for accurate(?) search result?

Thank you,
Sanghoon

Generating data sets by different seed number?

When I generate 1000 data sets in the Data box, may I be sure that the 1000 data sets will be generated by all different seed numbers? Is there no possibility that I would get the same data sets generated by the same seed number? This question is under assumption that I have many causal variables in my graph and I set large sample size enough to generate all different data sets more than 1000.

I tried to generate 10 data sets when I have just 1 causal variable and 1 target, and I set sample size 2. Then, as we can anticipate, many data sets (7~8 data sets) were all the same. So, I was curious if TETRAD is programmed to assign every different seed number when generating 1000 data sets.

Sorry for asking many questions these days, and thank you,
Sanghoon

instantiate data sets and save them in command line method?

Hi,

This question was asked in the Goggle group, but it was not asnwered.

In TETRAD, I used the template, "Simulate data from IM" and instantiated 100 data sets in the IM box. I know that I can save the data sets to .txt file in the Data box. But, I don't want to save the 100 data set files manually.

Is there command line method that I generate/instantiate data sets like I did in IM box, and save the data sets? I think using command line to simulate and instantiate data sets will be very complicated because it will be difficult in command line to set 'Graph type', such as which variable is direct and which variable is target, and to set 'Parametric model' giving probabilities for each variable in every condition, Therefore, I was curious if there is command line method at least to save data sets automatically after I instantiated 100 or 1000 data sets in TETRAD workspace. (But, also I thought that there would be no method to extract the instantiated data sets from TETRAD in order to save the data sets using command line methods). I like to know if there is command line method to save the instantiated data sets.

Thank you,
Sanghoon

Recode Ling.

The algorithm is unstable, giving radically different answers each time the execute button is pressed. FastICA seems to be more unstable than it should be. Need to recode FastICA first. See Issue #61 and Issue #62.

command line "tetrad.jar" doesn't work.

Hi,

I followed the introduction for command line tetrad here,
https://github.com/cmu-phil/tetrad/wiki/Command-Line-Tetrad

But, it doesn't seem to work well for me. I am using linux server, and I think my java version is fine. Please look at below the java version checking and 'tetrad.jar' running, and error message. I attached my sample input file. Could you help me?

Simulated_example.txt

[user167@login0 8_TETRAD]$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (rhel-1.45.1.11.1.el6-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
[user167@login0 8_TETRAD]$ java -jar lib-tetrad-5.3.0-20151113.150857-1-tetracmd.jar -data Simulated_example.txt -datatype discrete -algorithm pc -depth -1 significance 0.01
Exception in thread "main" java.lang.UnsupportedClassVersionError: edu/cmu/tetrad/cmd/TetradCmd : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: edu.cmu.tetrad.cmd.TetradCmd. Program will exit.
[user167@login0 8_TETRAD]$

Add a checkbox for FGS in the interface to allow the user to assume one-edge faithfulness if they want.

Currently, the original GES algorithm and the newer FGS algorithm are both in the interface. One feature of FGS is that the user can assume that if X and Y are uncorrelated then X is not adjacent to Y in the graph. Assuming this kind of faithfulness speeds up the search considerably but is not always helpful. So the user should be able to choose whether to assume it or not. We need a switch to let the user decide.

Model fitness for instantiated models

I have a data of 20,000 records, my Bayes Parametric model contains latent variables and that is why I used EM Bayes Estimator to find an estimate of the parameters of the model. The problem is, the running time is very long - I waited few hours before I stopped the learning process. I have found other software (GeNIe, https://dslpitt.org/genie/) which can be used to estimate the parameters of the model for a given data and I was able to find an estimate of the parameters of my model for a shorter time. I have manually inserted the parameter values in the component "Instantiated model", however, I was not able to find a functionality to estimate the model fitness (P-value) so that I can know how good is my model. Could you please tell me whether this type of functionality exists in Tetrad?

Definition for edge directions

I ran TETRA cmd and got some information of interacting nodes and edge directions between the edges. I found this definition of edge direction in the manual of TETRAD v.4

  1. directed (-->), 2) undirected (---), 3) unoriented (o-o), and 4) bidirected (o->)

But, I couldn't find good definition of this in the manual of TETRAD v.5. Also, personally, I don't understand the difference between undirected (---) and unoriented (o-o). I think they sound the same. And, I think symbol of 'bidirected' should be <->, rather than o->. Could you teach me where I can find a good and clear definition of the edge directions? I need to define it for my lab's manuscript.

Thank you,
Sanghoon

Fix random tests in TestGeneralizedSem.

Several tests in TestGeneralizedSem (and maybe some other classes) depend on a random seed and sometimes fail. Need to fix a random seed for which they do not fail.

manual

I'm a new user of Tetrad V. The program is very impressive, but its usability would benefit greatly from some attention to the manual (new_manual.pdf). To begin with, separate the material into sections and add a table of contents, all with hyperlinks.

Thanks very much.

Get rid of unnecessary matrix libraries.

This is a wish-list item, maybe doable. Currently we are using the following matrix libraries:

    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-math3</artifactId>
        <version>3.5</version>
    </dependency>
    <dependency>
        <groupId>colt</groupId>
        <artifactId>colt</artifactId>
        <version>1.2.0</version>
    </dependency>
    <dependency>
        <groupId>gov.nist.math</groupId>
        <artifactId>jama</artifactId>
        <version>1.0.2</version>
    </dependency>
    <dependency>
        <groupId>com.googlecode.matrix-toolkits-java</groupId>
        <artifactId>mtj</artifactId>
        <version>1.0.1</version>
    </dependency>

Much of this is overlapping functionality. We have a class, TetradMatrix, that wraps the Apache matrix library. Can we remove some of the other matrix libraries and use TetradMatrix instead?

Fix CCD.

CCD does not pass its tests. The tests are good. It should pass all of them, and the tests should be commented back in.

It's not clear whether CCDGES should work or not. Probably it should be moved to a child repository unless proven correct.

"lib-tetrad-5.3.0-20151113.150857-1-tetradcmd.jar" is working in Windows, too.

Hi,

I just tested to use "lib-tetrad-5.3.0-20151113.150857-1-tetradcmd.jar" in Windows (I am using Windows Server 2008 R2 Enterprise), and it is working, too. In the Wiki, you explained that it should be Unix-type machine.. I am confused. Do I know something wrong? Is it okay to use it in Windows, and may I expect the same performance?

Thank you,
Sanghoon

Matrix Toolkits for Java (MTK) doesn't play well with 64 bit Windows.

If imports starting with no.uib.cipr.matrix are commented out, the problem code is put in red in IntelliJ. Classes affected are IndTestHsic, KernelUtils, Ling, Lingam.

The compiled classes seem to run OK, but the relevant tests break when run in Maven.

I think we should support 64 bit Windows. If so, need to translate this matrix algebra to a different library.

Joe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.