Class ContingencyTable

java.lang.Object
smile.validation.metric.ContingencyTable

public class ContingencyTable extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    final 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

    Constructors
    Constructor
    Description
    ContingencyTable(int[] y1, int[] y2)
    Constructor.
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • n

      public final int n
      The number of observations.
    • n1

      public final int n1
      The number of clusters of first clustering.
    • n2

      public final int n2
      The number of clusters of second clustering.
    • a

      public final int[] a
      The row sum of contingency table.
    • b

      public final int[] b
      The column sum of contingency table.
    • table

      public final int[][] table
      The contingency table.
  • Constructor Details

    • ContingencyTable

      public ContingencyTable(int[] y1, int[] y2)
      Constructor.
      Parameters:
      y1 - the first random variable.
      y2 - the second random variable.