Package smile.validation.metric
Class ContingencyTable
java.lang.Object
smile.validation.metric.ContingencyTable
The contingency table. A contingency table (aka a cross tabulation) is
a type of table in a matrix format that displays the (multivariate)
frequency distribution of the variables.
-
Field Summary
Modifier and TypeFieldDescriptionfinal int[]
The row sum of contingency table.final int[]
The column sum of contingency table.final int
The number of observations.final int
The number of clusters of first clustering.final int
The number of clusters of second clustering.final int[][]
The contingency table. -
Constructor Summary
-
Method Summary
-
Field Details
-
n
public final int nThe number of observations. -
n1
public final int n1The number of clusters of first clustering. -
n2
public final int n2The number of clusters of second clustering. -
a
public final int[] aThe row sum of contingency table. -
b
public final int[] bThe column sum of contingency table. -
table
public final int[][] tableThe contingency table.
-
-
Constructor Details
-
ContingencyTable
public ContingencyTable(int[] y1, int[] y2) Constructor.- Parameters:
y1
- the first random variable.y2
- the second random variable.
-