Class LegalCpdag
java.lang.Object
edu.cmu.tetrad.algcomparison.statistic.LegalCpdag
- All Implemented Interfaces:
Statistic,Serializable
The LegalCpdag class implements the Statistic interface and provides methods to evaluate whether an estimated graph
is a Legal CPDAG. A Legal CPDAG is determined based on the structure of the estimated graph.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance of the LegalCpdag class, representing a statistic used to evaluate whether an estimated graph is a Legal CPDAG. -
Method Summary
Modifier and TypeMethodDescriptionReturns the abbreviation "CPDAG", representing a Legal CPDAG.Provides a description of the output indicating whether the estimated graph is a Legal CPDAG.doublegetNormValue(double value) Returns the normalized value for the given input.doublegetValue(Graph trueGraph, Graph estGraph, DataModel dataModel, Parameters parameters) Calculates the value indicating whether the estimated graph is a Legal CPDAG (1.0) or not (0.0).
-
Constructor Details
-
LegalCpdag
public LegalCpdag()Constructs a new instance of the LegalCpdag class, representing a statistic used to evaluate whether an estimated graph is a Legal CPDAG.
-
-
Method Details
-
getAbbreviation
Returns the abbreviation "CPDAG", representing a Legal CPDAG.- Specified by:
getAbbreviationin interfaceStatistic- Returns:
- a string abbreviation "CPDAG"
-
getDescription
Provides a description of the output indicating whether the estimated graph is a Legal CPDAG.- Specified by:
getDescriptionin interfaceStatistic- Returns:
- a string description stating "1 if the estimated graph is Legal CPDAG, 0 if not"
-
getValue
Calculates the value indicating whether the estimated graph is a Legal CPDAG (1.0) or not (0.0).- Specified by:
getValuein interfaceStatistic- Parameters:
trueGraph- the true graph, not used in this implementationestGraph- the estimated graph to be checked for being a Legal CPDAGdataModel- the data model, not used in this implementationparameters- the parameters, not used in this implementation- Returns:
- 1.0 if the estimated graph is a Legal CPDAG, 0.0 otherwise
-
getNormValue
public double getNormValue(double value) Returns the normalized value for the given input. This method currently returns the input value as it is, without any modifications.- Specified by:
getNormValuein interfaceStatistic- Parameters:
value- the input value to be normalized- Returns:
- the normalized value, which is the same as the input value
-