Package si.ijs.kt.clus.error
Class ContingencyTable
java.lang.Object
si.ijs.kt.clus.error.common.ClusError
si.ijs.kt.clus.error.common.ClusNominalError
si.ijs.kt.clus.error.ContingencyTable
- All Implemented Interfaces:
Serializable
,ComponentError
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[][][]
protected static final String
static final long
Fields inherited from class si.ijs.kt.clus.error.common.ClusNominalError
m_Attrs, m_Default
Fields inherited from class si.ijs.kt.clus.error.common.ClusError
DEFAULT_ERROR, DEFAULT_POSTFIX, DETAIL_ALWAYS_VISIBLE, DETAIL_NEVER_VISIBLE, DETAIL_SMALL, DETAIL_VERY_SMALL, m_Dim, m_Parent, RELATIVE_ERROR, RELATIVE_POSTFIX, TREE_ERROR, TREE_POSTFIX
-
Constructor Summary
ConstructorsConstructorDescriptionContingencyTable
(ClusErrorList par, NominalAttrType[] nom) ContingencyTable
(ClusErrorList par, NominalAttrType[] nom, String info) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addExample
(DataTuple tuple, ClusStatistic pred) void
addInvalid
(DataTuple tuple) double
calcAccuracy
(int k) double
calcCramerV
(int k) double
calcDefaultAccuracy
(int i) int
calcNbCorrect
(int k) int
calcNbTotal
(int k) double
calcXSquare
(int k) double
double
get_auc()
double
double
double
double
get_TP()
double
double
getModelErrorComponent
(int i) getName()
Informationboolean
void
printString
(PrintWriter out, int wd, String str) boolean
Should this error be minimized (e.g.void
showAccuracy
(PrintWriter out, int i) void
showContTable
(PrintWriter out, int i) void
showModelError
(PrintWriter out, int detail) void
showSummaryError
(PrintWriter out, boolean detail) int
sumColumn
(int[][] table, int j) int
sumColumn
(int k, int j) int
sumRow
(int[][] table, int i) int
sumRow
(int k, int i) Methods inherited from class si.ijs.kt.clus.error.common.ClusNominalError
getAttr, setDefault, setDefault
Methods inherited from class si.ijs.kt.clus.error.common.ClusError
addExample, compute, computeLeafError, computeTreeErrorClusteringAbsolute, getAdditionalInfo, getAdditionalInfoFormatted, getCoverage, getDetailLevel, getDimension, getErrorClone, getFormat, getModelError, getModelErrorAdditive, getModelErrorStandardError, getNbCover, getNbExamples, getNbTotal, getParent, getPrefix, isComputeForModel, normalize, reset, setAdditionalInfo, setWeights, showDoubleArray, showDoubleArray, showDoubleArray, showModelError, showRelativeModelError, updateFromGlobalMeasure
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
REAL_PRED
- See Also:
-
m_ContTable
protected int[][][] m_ContTable
-
-
Constructor Details
-
ContingencyTable
-
ContingencyTable
-
-
Method Details
-
isMultiLine
public boolean isMultiLine()- Overrides:
isMultiLine
in classClusError
-
calcNbTotal
public int calcNbTotal(int k) -
calcNbCorrect
public int calcNbCorrect(int k) -
calcXSquare
public double calcXSquare(int k) -
calcCramerV
public double calcCramerV(int k) -
calcAccuracy
public double calcAccuracy(int k) -
calcDefaultAccuracy
public double calcDefaultAccuracy(int i) -
getModelErrorComponent
public double getModelErrorComponent(int i) - Specified by:
getModelErrorComponent
in interfaceComponentError
- Overrides:
getModelErrorComponent
in classClusError
-
getModelComponent
public double getModelComponent() -
showAccuracy
-
add
-
showModelError
- Overrides:
showModelError
in classClusError
-
sumColumn
public int sumColumn(int[][] table, int j) -
sumRow
public int sumRow(int[][] table, int i) -
sumColumn
public int sumColumn(int k, int j) -
sumRow
public int sumRow(int k, int i) -
showContTable
-
showSummaryError
-
printString
-
getName
Description copied from class:ClusError
Information -
getErrorClone
- Specified by:
getErrorClone
in classClusError
-
addExample
- Overrides:
addExample
in classClusError
-
addInvalid
- Overrides:
addInvalid
in classClusError
-
get_error_classif
public double get_error_classif()- Overrides:
get_error_classif
in classClusError
-
get_TP
public double get_TP() -
get_accuracy
public double get_accuracy()- Overrides:
get_accuracy
in classClusError
-
get_precision
public double get_precision()- Overrides:
get_precision
in classClusError
-
get_recall
public double get_recall()- Overrides:
get_recall
in classClusError
-
get_auc
public double get_auc() -
shouldBeLow
public boolean shouldBeLow()Description copied from class:ClusError
Should this error be minimized (e.g. RRSE) or maximized (e.g. accuracy)? True by default.- Specified by:
shouldBeLow
in classClusError
-