pyconstruct.metrics.hamming

pyconstruct.metrics.hamming(Y_true, Y_pred, key=None, n_jobs=1)

Element-wise Hamming distance.

Parameters:
  • Y_true (array-like or [array-like]) – The true output objects.
  • Y_pred (array-like or [array-like]) – The predicted objects.
  • key (str) – The key of the objects which to compute the hamming distance on.
  • n_jobs (int) – The number of parallel thread to use to compute the losses.
Returns:

hamming – The hamming distance(s)

Return type:

float or [float]