|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.strbio.math.IMatrix org.strbio.math.StatsMatrix org.strbio.math.CorrectMatrix
public class CorrectMatrix
If your prediction is yes/no, or if you are only interested in stats on correctness and incorrectness, you can create a matrix which is 2xN, where N is the number of possible categories in reality, and data[0][i] indicates the number of wrong predictions of things belonging to catogory i (you predicted them as something other than i), while data[1][i] indicates the number of correct predictions of things belonging to category i.
Field Summary |
---|
Fields inherited from class org.strbio.math.IMatrix |
---|
data |
Constructor Summary | |
---|---|
CorrectMatrix()
|
|
CorrectMatrix(IMatrix x)
|
|
CorrectMatrix(int n)
|
|
CorrectMatrix(int[][] x)
|
Method Summary | |
---|---|
void |
addCorrect(int a)
Add a correct guess for category A. |
void |
addWrong(int a)
Add a wrong guess for category A. |
double |
matthews(int a)
Return the Matthews correlation coefficient for property A. |
double |
pctRight()
return percent right, from 0 to 100. |
double |
pctRightActually(int a)
Return the percent right only for predictions of items which actually belonged to category A. |
int |
rightActually(int a)
How many of the items that actually belonged to category A were predicted correctly? |
int |
totalActually(int a)
How many items are there in category A? |
int |
wrongActually(int a)
How many of the items that actually belonged to category A were predicted incorrectly? |
Methods inherited from class org.strbio.math.StatsMatrix |
---|
clear |
Methods inherited from class org.strbio.math.IMatrix |
---|
add, add, cols, equals, isEmpty, load, load, load, max, min, multiply, multiply, multiply, print, rows, save, save, saveBinary, saveBinary, setValue, setValueAt, subtract, subtract, valueAt |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CorrectMatrix()
public CorrectMatrix(int n)
public CorrectMatrix(IMatrix x)
public CorrectMatrix(int[][] x)
Method Detail |
---|
public final double pctRight()
pctRight
in class StatsMatrix
public final double matthews(int a)
matthews
in class StatsMatrix
public final double pctRightActually(int a)
pctRightActually
in class StatsMatrix
public final int rightActually(int a)
rightActually
in class StatsMatrix
public final int wrongActually(int a)
wrongActually
in class StatsMatrix
public final int totalActually(int a)
totalActually
in class StatsMatrix
public final void addCorrect(int a)
public final void addWrong(int a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |