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

Several fixes, updates. #1699

Merged
merged 46 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2956a57
New branch to reconcile other branches.
jdramsey Oct 3, 2023
7fc4fc1
New branch to reconcile other branches.
jdramsey Oct 3, 2023
f386d2f
New branch to reconcile other branches.
jdramsey Oct 3, 2023
ad0f298
Fixed variable orderign 1.2.3... for knowledge required/forbidden edg…
jdramsey Oct 3, 2023
a99fcb9
Fixed variable orderign 1.2.3... for knowledge required/forbidden edg…
jdramsey Oct 3, 2023
cb04147
Collapsed existsSemiDirectedPaths() methods in Paths.
jdramsey Oct 5, 2023
078b0d7
Collapsed existsSemiDirectedPaths() methods in Paths.
jdramsey Oct 5, 2023
2b3dbff
Fixed private static long serialVerUids
jdramsey Oct 5, 2023
a1af3de
Fixed private static long serialVerUids
jdramsey Oct 5, 2023
351a959
Working on the determnistic SEM IM issue.
jdramsey Oct 5, 2023
229c5ba
Working on the determnistic SEM IM issue.
jdramsey Oct 5, 2023
d63102c
Working on the determnistic SEM IM issue.
jdramsey Oct 5, 2023
4095f43
Copyed some layouts from Tetrad-FX.
jdramsey Oct 5, 2023
13b08b2
Substituted continuous and discrete data loader methods from Tetrad-F…
jdramsey Oct 5, 2023
d78c058
Same for mixed data loader.
jdramsey Oct 5, 2023
7329ec6
Copied over the mixed loader and also methods to save and load JSON f…
jdramsey Oct 5, 2023
95f6a2a
Copied data transforms and graph transforms over from tetrad-fx; need…
jdramsey Oct 5, 2023
528aa27
Added a menu item to the PlotMatrix to remove the minimum points per …
jdramsey Oct 6, 2023
b6cb41f
Switched that manu item to remove zeros from the data instead of minima.
jdramsey Oct 6, 2023
6096c6a
Switched that manu item to remove zeros from the data instead of minima.
jdramsey Oct 7, 2023
1def095
Changed the default layout for graphs to circle if # nodes <= 20 and …
jdramsey Oct 12, 2023
0598206
Added remove zero points per plot feature for Histogram.
jdramsey Oct 12, 2023
65105c8
Inlined DataTransforms methods in DataUtils.
jdramsey Oct 12, 2023
78a3dc6
For all tests, throwing an exception if singularities, undefined p-va…
jdramsey Oct 12, 2023
640cd00
Fixed this issues:
jdramsey Oct 12, 2023
79cbf87
Fixed PC-LiNGAM and added it back into the interface.
jdramsey Oct 13, 2023
d74d125
Factored out the method in Markov Check that generates all of the ind…
jdramsey Oct 13, 2023
6e22d4b
Factored out the method in Markov Check that generates all of the ind…
jdramsey Oct 13, 2023
9e886e7
Fixed tests.
jdramsey Oct 13, 2023
6a199a6
Fixing some javadoc errors insisted on by the new Javadoc builder.
jdramsey Oct 13, 2023
e77e8f6
Fixing some javadoc errors insisted on by the new Javadoc builder.
jdramsey Oct 13, 2023
a2729a5
Fixing some javadoc errors insisted on by the new Javadoc builder.
jdramsey Oct 13, 2023
1f3d6ba
Trying to fix a persistent bug in knowledge where when you delete req…
jdramsey Oct 15, 2023
90a0272
Trying to fix a persistent bug in knowledge where when you delete req…
jdramsey Oct 19, 2023
3bd738e
Trying to fix a bug in FCI-like algorithms where with R1 or R9 direct…
jdramsey Oct 20, 2023
8e6b52a
Actually fixed the FCI knowledge but this time. The issue was that th…
jdramsey Oct 20, 2023
559f803
Actually fixed the FCI knowledge but this time. The issue was that th…
jdramsey Oct 20, 2023
e0c1cec
Actually fixed the FCI knowledge but this time. The issue was that th…
jdramsey Oct 21, 2023
91e62f6
Actually fixed the FCI knowledge but this time. The issue was that th…
jdramsey Oct 21, 2023
3e00658
Fixed some unit tests.
jdramsey Oct 21, 2023
18fa2ab
Fixed some unit tests.
jdramsey Oct 24, 2023
8dc9855
Fixed some knowledge issues.
jdramsey Oct 27, 2023
3aecff1
Fixed some knowledge issues.
jdramsey Oct 27, 2023
6aaca9c
Fixed some knowledge issues.
jdramsey Oct 27, 2023
66b920b
Fixed some knowledge issues.
jdramsey Oct 30, 2023
43c260d
Fixed a problem with Fisher Z with testwise deletion.
jdramsey Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion 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.5.1-SNAPSHOT</version>
</parent>
<!-- <groupId>io.github.cmu-phil</groupId>-->
<artifactId>data-reader</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions 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.5.0</version>
<version>7.5.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Tetrad Project</name>
Expand Down Expand Up @@ -116,7 +116,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.6.0</version>
<configuration>
<javadocExecutable>/usr/bin/javadoc</javadocExecutable>
</configuration>
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.5.0</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>tetrad-gui</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

import edu.cmu.tetrad.graph.Graph;
import edu.cmu.tetrad.graph.GraphNode;
import edu.cmu.tetrad.graph.GraphTransforms;
import edu.cmu.tetrad.graph.Node;
import edu.cmu.tetrad.search.utils.GraphSearchUtils;
import edu.cmu.tetrad.util.JOptionUtils;
import edu.cmu.tetrad.util.TetradSerializable;
import edu.cmu.tetradapp.workbench.DisplayEdge;
Expand All @@ -49,7 +49,7 @@ public class CPDAGDisplay extends JPanel implements GraphEditable {
private GraphWorkbench workbench;

public CPDAGDisplay(Graph graph) {
List<Graph> dags = GraphSearchUtils.generateCpdagDags(graph, false);
List<Graph> dags = GraphTransforms.generateCpdagDags(graph, false);

if (dags.size() == 0) {
JOptionPane.showMessageDialog(
Expand Down Expand Up @@ -81,7 +81,7 @@ public CPDAGDisplay(Graph graph) {
String option = (String) box.getSelectedItem();

if ("Orient --- only".equals(option)) {
List _dags = GraphSearchUtils.generateCpdagDags(graph, false);
List _dags = GraphTransforms.generateCpdagDags(graph, false);
dags.clear();
dags.addAll(_dags);
SpinnerNumberModel model1 =
Expand All @@ -97,7 +97,7 @@ public CPDAGDisplay(Graph graph) {
totalLabel.setText(" of " + dags.size());
CPDAGDisplay.this.workbench.setGraph(dags.get(0));
} else if ("Orient ---, &lt;->".equals(option)) {
List _dags = GraphSearchUtils.generateCpdagDags(graph, true);
List _dags = GraphTransforms.generateCpdagDags(graph, true);
dags.clear();
dags.addAll(_dags);
SpinnerNumberModel model1 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static String generateDescriptiveStats(DataSet dataSet, Node variable,
table.setToken(rowindex, 0, "Skewness:");
table.setToken(rowindex++, 1, nf.format(StatUtils.skewness(data)));

table.setToken(rowindex, 0, "Kurtosis:");
table.setToken(rowindex, 0, "" + "Kurtosis:");
table.setToken(rowindex++, 1, nf.format(StatUtils.kurtosis(data)));

if (continuous) {
Expand All @@ -120,7 +120,7 @@ public static String generateDescriptiveStats(DataSet dataSet, Node variable,
}

table.setToken(rowindex, 0, "Constant Columns:");
List<Node> constantColumns = DataUtils.getConstantColumns(dataSet);
List<Node> constantColumns = DataTransforms.getConstantColumns(dataSet);
table.setToken(rowindex++, 1, constantColumns.isEmpty() ? "None" : constantColumns.toString());

table.setToken(rowindex, 0, "Example Nonsingular (2 - 3 vars):");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import edu.cmu.tetrad.data.CovarianceMatrix;
import edu.cmu.tetrad.data.DataSet;
import edu.cmu.tetrad.data.DataTransforms;
import edu.cmu.tetrad.data.DataUtils;
import edu.cmu.tetrad.graph.Node;
import edu.cmu.tetradapp.util.DesktopController;
Expand Down Expand Up @@ -87,13 +88,16 @@ private Box createDescriptiveStatsDialog() {

String coonstantColumnsString = "Constant Columns: ";
assert dataSet != null;
java.util.List<Node> constantColumns = DataUtils.getConstantColumns(dataSet);
java.util.List<Node> constantColumns = DataTransforms.getConstantColumns(dataSet);
coonstantColumnsString += constantColumns.isEmpty() ? "None" : constantColumns.toString();
String nonsingularString = null;

String nonsingularString = "Example Nonsingular (2 vars): ";
CovarianceMatrix covarianceMatrix = new CovarianceMatrix(dataSet);
List<Node> exampleNonsingular = DataUtils.getExampleNonsingular(covarianceMatrix, 2);
nonsingularString += exampleNonsingular == null ? "None" : exampleNonsingular.toString();
if (dataSet.isContinuous()) {
nonsingularString = "Example Nonsingular (2 vars): ";
CovarianceMatrix covarianceMatrix = new CovarianceMatrix(dataSet);
List<Node> exampleNonsingular = DataUtils.getExampleNonsingular(covarianceMatrix, 2);
nonsingularString += exampleNonsingular == null ? "None" : exampleNonsingular.toString();
}

Box box = Box.createVerticalBox();

Expand Down Expand Up @@ -128,7 +132,11 @@ private Box createDescriptiveStatsDialog() {
box.add(b1);

Box b2 = Box.createHorizontalBox();
b2.add(new JLabel(nonsingularString));
if (nonsingularString != null) {
b2.add(new JLabel(nonsingularString));
}

// b2.add(new JLabel(nonsingularString));
b2.add(Box.createHorizontalGlue());
box.add(b2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ public static Ret generateDescriptiveStats(DataSet dataSet, Node variable) {
names.add("Kurtosis");
stats.add(StatUtils.kurtosis(data));

names.add("Skewness");
stats.add(StatUtils.skewness(data));


if (continuous) {
double[] median = DescriptiveStats.median(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private JPanel createDialog(FactorAnalysis analysis) {
}
}

LayoutUtil.circleLayout(graph);
LayoutUtil.defaultLayout(graph);
LayoutUtil.fruchtermanReingoldLayout(graph);

GraphWorkbench workbench = new GraphWorkbench(graph);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected void setup(String resultLabel) {
display.setEditable(false);
display.setFont(new Font("Monospaced", Font.PLAIN, 12));

LayoutUtil.circleLayout(graph);
LayoutUtil.defaultLayout(graph);
LayoutUtil.fruchtermanReingoldLayout(graph);

GraphWorkbench workbench = new GraphWorkbench(graph);
Expand Down Expand Up @@ -132,7 +132,7 @@ protected void doDefaultArrangement(Graph resultGraph) {
LayoutUtil.arrangeBySourceGraph(resultGraph,
getLatestWorkbenchGraph());
} else {
LayoutUtil.circleLayout(resultGraph);
LayoutUtil.defaultLayout(resultGraph);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* @author josephramsey
*/
public class GraphAdjacencyIntersectionWrapper implements SessionModel, DoNotAddOldModel {
static final long serialVersionUID = 23L;
private static final long serialVersionUID = 23L;
private List<Graph> graphs;
private String name = "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void actionPerformed(ActionEvent e) {
}

if (!allSpecified) {
LayoutUtil.circleLayout(bayesIm.getBayesPm().getDag());
LayoutUtil.defaultLayout(bayesIm.getBayesPm().getDag());
}

this.bayesImWrapper.setBayesIm(bayesIm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void actionPerformed(ActionEvent e) {
}

if (!allSpecified) {
LayoutUtil.circleLayout(bayesIm.getBayesPm().getDag());
LayoutUtil.defaultLayout(bayesIm.getBayesPm().getDag());
}

this.bayesImWrapper.setBayesIm(bayesIm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void actionPerformed(ActionEvent e) {
Preferences.userRoot().put("fileSaveLocation", file.getParent());

Graph graph = GraphSaveLoadUtils.loadGraph(file);
LayoutUtil.circleLayout(graph);
LayoutUtil.defaultLayout(graph);
this.graphEditable.setGraph(graph);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void actionPerformed(ActionEvent e) {
Preferences.userRoot().put("fileSaveLocation", file.getParent());

Graph graph = GraphSaveLoadUtils.loadGraphPcalg(file);
LayoutUtil.circleLayout(graph);
LayoutUtil.defaultLayout(graph);
this.graphEditable.setGraph(graph);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void actionPerformed(ActionEvent e) {
Preferences.userRoot().put("fileSaveLocation", file.getParent());

Graph graph = GraphSaveLoadUtils.loadGraphTxt(file);
LayoutUtil.circleLayout(graph);
LayoutUtil.defaultLayout(graph);
this.graphEditable.setGraph(graph);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public LogisticRegressionEditor(LogisticRegressionRunner regressionRunner) {
// modelParameters.setText(regRunner.getReport());
print(regressionRunner.getResult(), regressionRunner.getAlpha());
Graph outGraph = regressionRunner.getOutGraph();
LayoutUtil.circleLayout(outGraph);
LayoutUtil.defaultLayout(outGraph);
LayoutUtil.fruchtermanReingoldLayout(outGraph);
workbench.setGraph(outGraph);
TetradLogger.getInstance().log("result", this.modelParameters.getText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,14 +830,15 @@ private Box createHistogramPanel(boolean indep) {
return Box.createVerticalBox();
}


DataSet dataSet = new BoxDataSet(new VerticalDoubleDataBox(results.size(), 1),
Collections.singletonList(new ContinuousVariable("P-Value or Bump")));

for (int i = 0; i < results.size(); i++) {
dataSet.setDouble(i, 0, results.get(i).getPValue());
}

Histogram histogram = new Histogram(dataSet, "P-Value or Bump");
Histogram histogram = new Histogram(dataSet, "P-Value or Bump", false);
// histogram.setTarget("P-Value or Bump");
HistogramPanel view = new HistogramPanel(histogram, true);

Expand Down
Loading