Class ArrowConfusion
java.lang.Object
edu.cmu.tetrad.algcomparison.statistic.utils.ArrowConfusion
A confusion matrix for arrows--i.e. TP, FP, TN, FN for counts of arrow endpoints. A true positive arrow is counted
for X*->Y in the estimated graph if X is not adjacent to Y or X--Y or X<--Y.
- Author:
- josephramsey, rubens (November, 2016)
-
Constructor Summary
ConstructorsConstructorDescriptionArrowConfusion(Graph truth, Graph est) Constructs a new ArrowConfusion object.ArrowConfusion(Graph truth, Graph est, boolean truthAdj) Constructs a new ArrowConfusion object. -
Method Summary
Modifier and TypeMethodDescriptionintgetFn()False negatives.intgetFnc()False negatives for common edges.intgetFp()False positives.intgetFpc()False positives for common edges.intgetTn()True negatives.intgetTnc()True Negatives for common edges.intgetTp()True positives.intgetTpc()True positives for common edges.intFalse negatives for two-cycles.intFalse positives for two-cycles.intTwo positives for two-cycles.booleanReturns true if the truth graph is used to determine adjacency for arrowhead FP's.
-
Constructor Details
-
ArrowConfusion
Constructs a new ArrowConfusion object.- Parameters:
truth- the true graphest- the estimated graph
-
ArrowConfusion
Constructs a new ArrowConfusion object.- Parameters:
truth- the true graphest- the estimated graphtruthAdj- if true, use the true graph to determine adjacency for arrowhead FP's
-
-
Method Details
-
getTp
public int getTp()True positives.- Returns:
- the number of true positives
-
getFp
public int getFp()False positives.- Returns:
- the number of false positives
-
getFn
public int getFn()False negatives.- Returns:
- the number of false negatives
-
getTn
public int getTn()True negatives.- Returns:
- the number of true negatives
-
getTwoCycleTp
public int getTwoCycleTp()Two positives for two-cycles.- Returns:
- the number of true positives for two-cycles.
-
getTwoCycleFp
public int getTwoCycleFp()False positives for two-cycles.- Returns:
- the number of false positives for two-cycles.
-
getTwoCycleFn
public int getTwoCycleFn()False negatives for two-cycles.- Returns:
- the number of false negatives for two-cycles.
-
getTpc
public int getTpc()True positives for common edges.- Returns:
- the number of true positives for common edges
-
getFpc
public int getFpc()False positives for common edges.- Returns:
- the number of false positives for common edges
-
getFnc
public int getFnc()False negatives for common edges.- Returns:
- the number of false negatives for common edges
-
getTnc
public int getTnc()True Negatives for common edges.- Returns:
- the number of true negatives for common edges
-
isTruthAdj
public boolean isTruthAdj()Returns true if the truth graph is used to determine adjacency for arrowhead FP's.- Returns:
- true if the truth graph is used to determine adjacency for arrowhead FP's
-