Class SweepResult

java.lang.Object
edu.cmu.tetrad.algcomparison.sweep.SweepResult

public final class SweepResult extends Object
The immutable result of evaluating one parameter setting in a ParameterSweep: the setting itself, the point-estimate graph searched on the full data, a probability-annotated graph aggregating the resample searches (in the same display convention as bootstrap results elsewhere in Tetrad), the StARS-style adjacency instability over the resamples, Markov-check statistics for the point graph (if a Markov-check test was configured), and timing.

This object records evidence about a setting; it does not judge settings. Selection rules live on SweepReport and are explicit, overridable decisions.

Version:
$Id: $Id
Author:
josephramsey
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Markov-check statistics for a point graph, mirroring the statistics returned by MarkovCheck: for the implied independencies ("Ind") and implied dependencies ("Dep") respectively, the Anderson-Darling p-value for uniformity of the local p-values, the Kolmogorov-Smirnov p-value, the binomial p-value, the fraction of facts judged dependent, and the number of facts tested.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SweepResult(Map<String,Object> setting, Graph pointGraph, Graph edgeProbabilityGraph, double adjacencyInstability, SweepResult.MarkovStats markovStats, int numResamples, long elapsedMillis)
    Constructs a result.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the StARS-style adjacency instability over the resamples, in [0, 0.5], or NaN if no resamples were run.
    Returns the probability-annotated graph aggregating the resample searches, or null if no resamples were run.
    long
    Returns the wall time in milliseconds for this setting.
    Returns the Markov-check statistics for the point graph, or null if no Markov-check test was configured.
    int
    Returns the number of resample searches aggregated.
    Returns the point-estimate graph from searching the full dataset at this setting.
    Returns the parameter values for this setting, unmodifiable, in insertion order.
    Returns a one-line rendering of this result.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SweepResult

      public SweepResult(Map<String,Object> setting, Graph pointGraph, Graph edgeProbabilityGraph, double adjacencyInstability, SweepResult.MarkovStats markovStats, int numResamples, long elapsedMillis)
      Constructs a result. Intended to be called by ParameterSweep.
      Parameters:
      setting - the parameter values for this setting; copied.
      pointGraph - the point-estimate graph.
      edgeProbabilityGraph - the probability-annotated resample aggregate, or null.
      adjacencyInstability - the adjacency instability, or NaN.
      markovStats - the Markov-check statistics, or null.
      numResamples - the number of resample searches aggregated.
      elapsedMillis - wall time in milliseconds.
  • Method Details

    • getSetting

      public Map<String,Object> getSetting()
      Returns the parameter values for this setting, unmodifiable, in insertion order.
      Returns:
      This map.
    • getPointGraph

      public Graph getPointGraph()
      Returns the point-estimate graph from searching the full dataset at this setting.
      Returns:
      This graph.
    • getEdgeProbabilityGraph

      public Graph getEdgeProbabilityGraph()
      Returns the probability-annotated graph aggregating the resample searches, or null if no resamples were run. Edge probabilities display identically to bootstrap results elsewhere in Tetrad.
      Returns:
      This graph or null.
    • getAdjacencyInstability

      public double getAdjacencyInstability()
      Returns the StARS-style adjacency instability over the resamples, in [0, 0.5], or NaN if no resamples were run.
      Returns:
      This instability.
    • getMarkovStats

      public SweepResult.MarkovStats getMarkovStats()
      Returns the Markov-check statistics for the point graph, or null if no Markov-check test was configured.
      Returns:
      These statistics or null.
    • getNumResamples

      public int getNumResamples()
      Returns the number of resample searches aggregated.
      Returns:
      This number.
    • getElapsedMillis

      public long getElapsedMillis()
      Returns the wall time in milliseconds for this setting.
      Returns:
      This time.
    • toString

      public String toString()
      Returns a one-line rendering of this result.
      Overrides:
      toString in class Object
      Returns:
      This rendering.