/// <summary> /// Writes a short report that includes accept rate, accept count, and total count. /// </summary> /// <param name="writer">A stream to write the report to.</param> /// <param name="statistics">A classification statistics to get report data from.</param> private static void WriteShortStatistics(TextWriter writer, ClassificationStatistics statistics) { writer.Write( ShortFormat, statistics.Count, Percentage(statistics.Accepted, statistics.Count), statistics.Accepted); }
/// <summary> /// Writes a long report that includes accept rate, accept count, total count, error rate, error count, valid rate, and valid count. /// </summary> /// <param name="writer">A stream to write the report to.</param> /// <param name="statistics">A classification statistics to get report data from.</param> private static void WriteLongStatistics(TextWriter writer, ClassificationStatistics statistics) { writer.Write( LongFormat, statistics.Count, Percentage(statistics.Accepted, statistics.Count), statistics.Accepted, Percentage(statistics.Errors, statistics.Accepted), statistics.Errors, Percentage(statistics.Valid, statistics.Count), statistics.Valid); }
/// <inheritdoc /> public override bool Equals(object obj) { if (object.ReferenceEquals(null, obj)) { return(false); } if (object.ReferenceEquals(this, obj)) { return(true); } ClassificationStatistics other = obj as ClassificationStatistics; if (other == null) { return(false); } return(this.Count == other.Count && this.Valid == other.Valid && this.Accepted == other.Accepted && this.Errors == other.Errors); }