public string WriteReport(List<BinSkillScore> skills, string heading = null) { var builder = new StringBuilder(); if (!string.IsNullOrEmpty(heading)) builder.AppendLine(heading); builder.AppendLine(ToStringAggregate(skills)); double avg = Success.Average(e => e.Value.Average(f => f.Value.Value)); var avgCorr = new RestrictedRangeDouble(0, turbines.Count(), avg); builder.AppendLine("Avg % Compared: " + GetAvgSuccessfullyCorrected()); builder.AppendLine(string.Format("Able to process {0}% of the weather forecasts", GetPeriodProcessedPercentage())); builder.AppendLine("For inspection of all time points, check the success property."); return builder.ToString(); }
public Percent GetAvgSuccessfullyCorrected() { double avg = Success.Average(e => e.Value.Average(f => f.Value.Value)); var avgCorr = new RestrictedRangeDouble(0, turbines.Count(), avg); return avgCorr.ToPercent(); }