def __init__(self, tp=<NUM_LIT:0>, tn=<NUM_LIT:0>, fp=<NUM_LIT:0>, fn=<NUM_LIT:0>):
if isinstance(tp, (tuple, list)):<EOL><INDENT>if len(tp) == <NUM_LIT:4>:<EOL><INDENT>self._tp = tp[<NUM_LIT:0>]<EOL>self._tn = tp[<NUM_LIT:1>]<EOL>self._fp = tp[<NUM_LIT:2>]<EOL>self._fn = tp[<NUM_LIT:3>]<EOL><DEDENT>else:<EOL><INDENT>raise AttributeError(<EOL>'<STR_LIT>'<EOL>+ '<STR_LIT>'<EOL>)<EOL><DEDENT><DEDENT>elif isinstance(tp, dict):<EOL><INDENT>if '<STR_LIT>' in tp:<EOL><INDENT>self._tp = tp['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in tp:<EOL><INDENT>self._tn = tp['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in tp:<EOL><INDENT>self._fp = tp['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in tp:<EOL><INDENT>self._fn = tp['<STR_LIT>']<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._tp = tp<EOL>self._tn = tn<EOL>self._fp = fp<EOL>self._fn = fn<EOL><DEDENT>
Initialize ConfusionTable.

        Parameters
        ----------
        tp : int or a tuple, list, or dict
            True positives; If a tuple or list is supplied, it must include 4
            values in the order [tp, tn, fp, fn]. If a dict is supplied, it
            must have 4 keys, namely 'tp', 'tn', 'fp', & 'fn'.
        tn : int
            True negatives
        fp : int
            False positives
        fn : int
            False negatives

        Raises
        ------
        AttributeError
            ConfusionTable requires a 4-tuple when being created from a tuple.

        Examples
        --------
        >>> ct = ConfusionTable(120, 60, 20, 30)
        >>> ct == ConfusionTable((120, 60, 20, 30))
        True
        >>> ct == ConfusionTable([120, 60, 20, 30])
        True
        >>> ct == ConfusionTable({'tp': 120, 'tn': 60, 'fp': 20, 'fn': 30})
        True