def confusion_matrix(targets, predictions):
    r"""
    Compute the confusion matrix for classifier predictions.

    Parameters
    ----------
    targets : SArray
        Ground truth class labels (cannot be of type float).

    predictions : SArray
        The prediction that corresponds to each target value.
        This vector must have the same length as ``targets``. The predictions
        SArray cannot be of type float.

    Returns
    -------
    out : SFrame
        An SFrame containing counts for 'target_label', 'predicted_label' and
        'count' corresponding to each pair of true and predicted labels.

    See Also
    --------
    accuracy

    Examples
    --------
    >>> targets = turicreate.SArray([0, 1, 1, 0])
    >>> predictions = turicreate.SArray([1, 0, 1, 0])

    >>> turicreate.evaluation.confusion_matrix(targets, predictions)
    """

    _supervised_evaluation_error_checking(targets, predictions)
    _check_same_type_not_float(targets, predictions)
    return _turicreate.extensions._supervised_streaming_evaluator(targets,
                       predictions, "confusion_matrix_no_map", {})