Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
 /// <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());
 }