|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.strbio.math.IMatrix
org.strbio.math.StatsMatrix
public abstract class StatsMatrix
This class describes a special kind of integer matrix which is used for keeping stats on how well a predictive procedure is performing. This is useful only for discrete predictions; i.e. there are N categories something can be in, and you want to predict it as one of these N (or at least eliminate some of the choices). There are 2 types of these matrices, called "similarity matrices" and "correctness matrices"; this is an abstract class that includes both.
SimMatrix
,
CorrectMatrix
Field Summary |
---|
Fields inherited from class org.strbio.math.IMatrix |
---|
data |
Constructor Summary | |
---|---|
StatsMatrix()
|
|
StatsMatrix(IMatrix x)
|
|
StatsMatrix(int[][] x)
|
|
StatsMatrix(int c,
int r)
|
Method Summary | |
---|---|
void |
clear()
Clear all statistics. |
abstract double |
matthews(int a)
Return the Matthews correlation coefficient for category A. |
abstract double |
pctRight()
return percent right, from 0 to 100. |
abstract double |
pctRightActually(int a)
Return the percent right only for predictions of items which actually belonged to category A. |
abstract int |
rightActually(int a)
How many of the items that actually belonged to category A were predicted correctly? |
abstract int |
totalActually(int a)
How many items are there in category A? |
abstract 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.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 StatsMatrix()
public StatsMatrix(int c, int r)
public StatsMatrix(IMatrix x)
public StatsMatrix(int[][] x)
Method Detail |
---|
public final void clear()
public abstract double pctRight()
public abstract double matthews(int a)
public abstract double pctRightActually(int a)
public abstract int rightActually(int a)
public abstract int wrongActually(int a)
public abstract int totalActually(int a)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |