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.
- Version:
- $Id: $Id
- 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 TypeMethodDescriptionint
getFn()
False negatives.int
getFnc()
False negatives for common edges.int
getFp()
False positives.int
getFpc()
False positives for common edges.int
getTn()
True negatives.int
getTnc()
True Negatives for common edges.int
getTp()
True positives.int
getTpc()
True positives for common edges.int
False negatives for two-cycles.int
False positives for two-cycles.int
Two positives for two-cycles.boolean
Returns true if the truth graph is used to determine adjacency for arrowhead FP's.
-
Constructor Details
-
ArrowConfusion
-
ArrowConfusion
-
-
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
-