/// <inheritdoc /> public override bool Equals(object obj) { if (object.ReferenceEquals(null, obj)) { return(false); } if (object.ReferenceEquals(this, obj)) { return(true); } ConfusionMatrix <T> other = obj as ConfusionMatrix <T>; if (other == null) { return(false); } return(Enumerable.SequenceEqual(this.labels, other.labels)); }
/// <summary> /// Writes confusion matrix. /// </summary> /// <param name="writer">A stream to write the report to.</param> /// <param name="matrix">The confusion matrix to write.</param> private static void WriteConfusionMatrix(TextWriter writer, ConfusionMatrix <T> matrix) { writer.Write(matrix.ToString()); }