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 Stringstatic final longFields inherited from class si.ijs.kt.clus.error.common.ClusNominalError
m_Attrs, m_DefaultFields 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 TypeMethodDescriptionvoidvoidaddExample(DataTuple tuple, ClusStatistic pred) voidaddInvalid(DataTuple tuple) doublecalcAccuracy(int k) doublecalcCramerV(int k) doublecalcDefaultAccuracy(int i) intcalcNbCorrect(int k) intcalcNbTotal(int k) doublecalcXSquare(int k) doubledoubleget_auc()doubledoubledoubledoubleget_TP()doubledoublegetModelErrorComponent(int i) getName()InformationbooleanvoidprintString(PrintWriter out, int wd, String str) booleanShould this error be minimized (e.g.voidshowAccuracy(PrintWriter out, int i) voidshowContTable(PrintWriter out, int i) voidshowModelError(PrintWriter out, int detail) voidshowSummaryError(PrintWriter out, boolean detail) intsumColumn(int[][] table, int j) intsumColumn(int k, int j) intsumRow(int[][] table, int i) intsumRow(int k, int i) Methods inherited from class si.ijs.kt.clus.error.common.ClusNominalError
getAttr, setDefault, setDefaultMethods 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:
isMultiLinein 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:
getModelErrorComponentin interfaceComponentError- Overrides:
getModelErrorComponentin classClusError
-
getModelComponent
public double getModelComponent() -
showAccuracy
-
add
-
showModelError
- Overrides:
showModelErrorin 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:ClusErrorInformation -
getErrorClone
- Specified by:
getErrorClonein classClusError
-
addExample
- Overrides:
addExamplein classClusError
-
addInvalid
- Overrides:
addInvalidin classClusError
-
get_error_classif
public double get_error_classif()- Overrides:
get_error_classifin classClusError
-
get_TP
public double get_TP() -
get_accuracy
public double get_accuracy()- Overrides:
get_accuracyin classClusError
-
get_precision
public double get_precision()- Overrides:
get_precisionin classClusError
-
get_recall
public double get_recall()- Overrides:
get_recallin classClusError
-
get_auc
public double get_auc() -
shouldBeLow
public boolean shouldBeLow()Description copied from class:ClusErrorShould this error be minimized (e.g. RRSE) or maximized (e.g. accuracy)? True by default.- Specified by:
shouldBeLowin classClusError
-