Class BlocksBicScore

java.lang.Object
edu.cmu.tetrad.algcomparison.score.BlocksBicScore
All Implemented Interfaces:
BlockScoreWrapper, ScoreWrapper, HasParameters, TetradSerializable, Serializable

@Score(name="Blocks-BIC", command="blocks-bic-score", dataType=Mixed) @Mixed public class BlocksBicScore extends Object implements BlockScoreWrapper
Wrapper for Blocks BIC Score (Blocks-BIC) version.
Version:
$Id: $Id
Author:
josephramsey, bryanandrews
See Also:
  • Constructor Details

    • BlocksBicScore

      public BlocksBicScore()
      Initializes a new instance of the BasisFunctionBicScore class.
  • Method Details

    • setBlockSpec

      public void setBlockSpec(BlockSpec blockSpec)
      Sets the block specification to define the structure for organizing variables into predefined blocks for analysis.
      Specified by:
      setBlockSpec in interface BlockScoreWrapper
      Parameters:
      blockSpec - the block specification to be set
    • getScore

      public Score getScore(DataModel model, Parameters parameters)
      Computes and returns a score based on the provided data model and parameter settings.
      Specified by:
      getScore in interface BlockScoreWrapper
      Specified by:
      getScore in interface ScoreWrapper
      Parameters:
      model - the data model that serves as the basis for the score computation
      parameters - contains configuration and parameter values used during the score computation
      Returns:
      a Score object representing the computed result based on the given model and parameters
    • getDescription

      public String getDescription()
      Provides a textual description of the score type.
      Specified by:
      getDescription in interface BlockScoreWrapper
      Specified by:
      getDescription in interface ScoreWrapper
      Returns:
      a string representing the description of the Blocks BIC score, indicating that it requires block specifications for computation.
    • getDataType

      public DataType getDataType()
      Retrieves the data type associated with this score wrapper.
      Specified by:
      getDataType in interface BlockScoreWrapper
      Specified by:
      getDataType in interface ScoreWrapper
      Returns:
      the data type, which indicates whether the data is continuous, discrete, mixed, or belongs to other specific categories such as covariance or graph. In this implementation, the data type is DataType.Mixed.
    • getParameters

      public List<String> getParameters()
      Retrieves a list of parameter keys used in the computation or configuration of the score.
      Specified by:
      getParameters in interface BlockScoreWrapper
      Specified by:
      getParameters in interface HasParameters
      Specified by:
      getParameters in interface ScoreWrapper
      Returns:
      a list of parameter names as strings. These parameters are required for score computation or configuration and include elements such as penalty discounts or other algorithm-specific settings.
    • getVariable

      public Node getVariable(String name)
      Retrieves a variable by its name from the associated data set.
      Specified by:
      getVariable in interface BlockScoreWrapper
      Specified by:
      getVariable in interface ScoreWrapper
      Parameters:
      name - the name of the variable to retrieve
      Returns:
      the Node object representing the variable with the specified name, or null if no such variable exists