Skip to content

Commit

Permalink
Added verbose option for StEPS
Browse files Browse the repository at this point in the history
  • Loading branch information
vineet1992 committed Apr 30, 2019
1 parent c7105ba commit 4687529
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tetrad-lib/src/main/java/edu/pitt/csb/mgm/STEPS.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public class STEPS {
private int [][] subs;
private boolean computeStabs;
private boolean runFull = false; //Don't monotonize instability and kill method as soon as stability threshold is met
private boolean verbose = false;

public STEPS(DataSet dat,double [] lam,double g,int numSub)
{
Expand Down Expand Up @@ -95,6 +96,7 @@ public void setIterLimit(int iterLimit)
this.iterLimit = iterLimit;
}
public void setComputeStabs(boolean stabs){computeStabs = stabs;}
public void setVerbose(){verbose = true;}
public double [][] runStepsArrayPar()
{
double [][] result = new double[lambda.length][4];
Expand Down Expand Up @@ -952,7 +954,13 @@ public Graph runStepsPar()
// System.out.println("b:" + b);
A:while(true) //go until we break by having instability better than threshold
{

double [] lambdaCurr = {lambda[currIndex],lambda[currIndex],lambda[currIndex]};

if(verbose)
{
System.out.println("Running Lambda values " + Arrays.toString(lambdaCurr) );
}
DoubleMatrix2D adjMat;
if(subs!=null)
adjMat = StabilityUtils.StabilitySearchPar(d,new SearchWrappers.MGMWrapper(lambdaCurr),subs);
Expand Down

0 comments on commit 4687529

Please sign in to comment.