Package edu.cmu.tetrad.search.score
Class GicScores
java.lang.Object
edu.cmu.tetrad.search.score.GicScores
- All Implemented Interfaces:
- Score
Implements scores motivated by the Generalized Information Criterion (GIC) approach as given in Kim et al. (2012).
 
Kim, Y., Kwon, S., & Choi, H. (2012). Consistent model selection criteria on high dimensions. The Journal of Machine Learning Research, 13(1), 1037-1057.
As for all scores in Tetrad, higher scores mean more dependence, and negative scores indicate independence.
- Version:
- $Id: $Id
- Author:
- josephramsey
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumGives the options for the rules to use for calculating the scores.
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs the score using a covariance matrix.GicScores(ICovarianceMatrix covariances) Constructs the score using a covariance matrix.
- 
Method SummaryModifier and TypeMethodDescriptionbooleandetermines(List<Node> z, Node y) Returns true iff the score determines the edge between x and y.Returns the sample size.Returns the dataset.intReturns the max degree, by default 1000.doubleReturns the penalty discount.intReturns the sample size.The variables of the score.booleanisEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.booleanReturns true if verbose output should be sent to out.doublelocalScore(int i, int... parents) Calculates the sample likelihood and BIC score for index i given its parents in a simple SEM model.doublelocalScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.voidsetLambda(double lambda) Sets the lambda parameter.voidsetPenaltyDiscount(double penaltyDiscount) Sets the penalty discount.voidsetRuleType(GicScores.RuleType ruleType) Sets the rule type.voidsetUsePseudoInverse(boolean usePseudoInverse) Sets whether to use the pseudo-inverse when calculating the score.voidsetVariables(List<Node> variables) Sets the variables of the dataset.voidsetVerbose(boolean verbose) Sets whether verbose output should be sent to out.toString()Returns a string for this object.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.cmu.tetrad.search.score.Scoreappend, getVariable, localScore, localScore, localScoreDiff
- 
Constructor Details- 
GicScoresConstructs the score using a covariance matrix.- Parameters:
- covariances- The covariance matrix.
 
- 
GicScoresConstructs the score using a covariance matrix.- Parameters:
- dataSet- The continuous dataset to analyze.
- precomputeCovariances- Whether the covariances should be precomputed or computed on the fly. True if
 
 
- 
- 
Method Details- 
localScoreDiffpublic double localScoreDiff(int x, int y, int[] z) Returns the score difference of the graph.Calculates the sample likelihood and BIC score for index i given its parents in a simple SEM model. - Specified by:
- localScoreDiffin interface- Score
- Parameters:
- x- A node.
- y- TAhe node.
- z- A set of nodes.
- Returns:
- The score difference.
 
- 
localScorepublic double localScore(int i, int... parents) Calculates the sample likelihood and BIC score for index i given its parents in a simple SEM model.- Specified by:
- localScorein interface- Score
- Parameters:
- i- The node.
- parents- The parents.
- Returns:
- The score.
 
- 
getCovariances
- 
getSampleSizepublic int getSampleSize()Returns the sample size.- Specified by:
- getSampleSizein interface- Score
- Returns:
- This size.
 
- 
isEffectEdgepublic boolean isEffectEdge(double bump) Returns true iff the edge between x and y is an effect edge.Returns true if an edge with this bump is an effect edge. - Specified by:
- isEffectEdgein interface- Score
- Parameters:
- bump- The bump.
- Returns:
- True iff the edge between x and y is an effect edge.
 
- 
getDataSet
- 
isVerbosepublic boolean isVerbose()Returns true if verbose output should be sent to out.- Returns:
- True if verbose output should be sent to out.
 
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether verbose output should be sent to out.- Parameters:
- verbose- True if verbose output should be sent to out.
 
- 
getVariablesThe variables of the score.Returns the variables of the dataset. - Specified by:
- getVariablesin interface- Score
- Returns:
- This list.
 
- 
setVariables
- 
getMaxDegreepublic int getMaxDegree()Returns the max degree, by default 1000.Returns the max degree of the graph for some algorithms. - Specified by:
- getMaxDegreein interface- Score
- Returns:
- The max degree.
 
- 
determinesReturns true iff the score determines the edge between x and y.Returns a judgment of whether the variable in z determine y exactly. - Specified by:
- determinesin interface- Score
- Parameters:
- z- The set of nodes.
- y- The node.
- Returns:
- True iff the score determines the edge between x and y.
 
- 
setRuleTypeSets the rule type.- Parameters:
- ruleType- The rule type.
- See Also:
 
- 
setLambdapublic void setLambda(double lambda) Sets the lambda parameter.- Parameters:
- lambda- The lambda parameter.
 
- 
getPenaltyDiscountpublic double getPenaltyDiscount()Returns the penalty discount.- Returns:
- The penalty discount.
 
- 
setPenaltyDiscountpublic void setPenaltyDiscount(double penaltyDiscount) Sets the penalty discount.- Parameters:
- penaltyDiscount- The penalty discount.
 
- 
toString
- 
setUsePseudoInversepublic void setUsePseudoInverse(boolean usePseudoInverse) Sets whether to use the pseudo-inverse when calculating the score.- Parameters:
- usePseudoInverse- True if so.
 
 
-