def get_html(self, base_file_name: str, h_level: int) -> str:
html = """
<h{}>Program: {!r} ({} lines, {} entropy)</h{}>
The following plot shows the mean score per input distribution for every implementation.
""".format(h_level, self.name, self.line_number, self.entropy, h_level)
html += self.get_box_plot_html(base_file_name)
scores = self.get_impl_mean_scores()
std_devs = self.get_statistical_property_scores(rel_std_dev_func)
html += """
<table class="table">
<tr><th>implementation</th><th>geom mean over means relative to best (per input) aka mean score</th>
<th>... std dev rel. to the best mean</th>
</tr>
"""
for impl in scores.keys():
html += """
<tr><td>{}</td><td>{:5.2%}</td><td>{:5.2%}</td></tr>
""".format(impl, stats.gmean(scores[impl]), stats.gmean(std_devs[impl]))
html += "</table>"
impl_names = list(scores.keys())
for (i, input) in enumerate(self.prog_inputs.keys()):
app = html_escape_property(input)
if len(app) > 20:
app = str(i)
html += self.prog_inputs[input].get_html(base_file_name + "_" + app, h_level + 1)
return html
评论列表
文章目录