# confusion_matrix

### cuml.metrics.confusion_matrix(y_true, y_pred, labels=None, sample_weight=None, normalize=None) → [ndarray](https://docs.cupy.dev/en/stable/reference/generated/cupy.ndarray.html#cupy.ndarray)[[source]](https://github.com/NVIDIA/cuml/blob/93418baf5/python/cuml/cuml/metrics/confusion_matrix.py#L16)

Compute confusion matrix to evaluate the accuracy of a classification.

* **Parameters:**
  **y_true**
  : Ground truth (correct) target values.

  **y_pred**
  : Estimated target values.

  **labels**
  : List of labels to index the matrix. This may be used to reorder or
    select a subset of labels. If None is given, those that appear at least
    once in y_true or y_pred are used in sorted order.

  **sample_weight**
  : Sample weights.

  **normalize**
  : Normalizes confusion matrix over the true (rows), predicted (columns)
    conditions or all the population. If None, confusion matrix will not be
    normalized.
* **Returns:**
  **C**
  : Confusion matrix on device.

<!-- !! processed by numpydoc !! -->
