Give the blind test by two measures, first and last months and also no wrong gap in the middle: 114 of 148 and 105 of 148, stored, scored and stated together
This commit is contained in:
1 parent
535d2bebaa
commit
e8ca8e862e
13 files changed
+183
-68
No files matched your search
@@ -116,9 +116,10 @@ def season_section(records, blind):
|
||||
{pagekit.table(["Where a trail's season comes from", "Trails"], rows, caption="Where the seasons come from", numeric=(1,))}"""]
|
||||
if blind:
|
||||
by = blind["by_confidence"]
|
||||
conf = ", ".join(f"{name} {by[name]['matched']} of {by[name]['tested']} ({_pct(by[name]['share'])})"
|
||||
conf = ", ".join(f"{name} {by[name]['matched']} of {by[name]['tested']} ({_pct(by[name]['share'])}) and "
|
||||
f"{by[name]['strict_matched']} ({_pct(by[name]['strict_share'])})"
|
||||
for name in ("high", "medium", "low") if by[name]["tested"])
|
||||
out.append(f"""<p>How the estimates were tested. On {esc(blind["date"])} the method was run blind on {blind["tested"]} trails whose seasons a page does state, with those seasons hidden. It matched {blind["matched"]} of them ({_pct(blind["share"])}) within one month at each end of the season the page states. By the confidence it gave each estimate: {esc(conf)}. This measures how the method did where the answer is known, not a promise for any one trail.</p>""")
|
||||
out.append(f"""<p>How the estimates were tested. On {esc(blind["date"])} the method was run blind on {blind["tested"]} trails whose seasons a page does state, with those seasons hidden. Two measures are given together. {blind["matched"]} of {blind["tested"]} ({_pct(blind["share"])}) had their first and last months within a month of the page’s; {blind["strict_matched"]} ({_pct(blind["strict_share"])}) also had no wrong gap in the middle, so the second measure counts a season with a gap that the page does not have, or without one that it has, as a miss. By the confidence it gave each estimate, first and last months and then also no wrong gap: {esc(conf)}. This measures how the method did where the answer is known, not a promise for any one trail.</p>""")
|
||||
return "\n ".join(out)
|
||||
|
||||
|
||||
|
||||
@@ -673,10 +673,12 @@ class RealDataTest(unittest.TestCase):
|
||||
blind = datafiles.blind_test(ROOT)
|
||||
text = self.method_text()
|
||||
self.assertIn(f"the method was run blind on {blind['tested']} trails whose seasons a page does state", text)
|
||||
self.assertIn(f"It matched {blind['matched']} of them ({round(blind['share'] * 100)} percent) within one month at "
|
||||
"each end", text)
|
||||
self.assertIn(f"{blind['matched']} of {blind['tested']} ({round(blind['share'] * 100)} percent) had their first "
|
||||
f"and last months within a month of the page\u2019s; {blind['strict_matched']} "
|
||||
f"({round(blind['strict_share'] * 100)} percent) also had no wrong gap in the middle", text)
|
||||
for name, v in blind["by_confidence"].items():
|
||||
self.assertIn(f"{name} {v['matched']} of {v['tested']} ({round(v['share'] * 100)} percent)", text)
|
||||
self.assertIn(f"{name} {v['matched']} of {v['tested']} ({round(v['share'] * 100)} percent) and "
|
||||
f"{v['strict_matched']} ({round(v['strict_share'] * 100)} percent)", text)
|
||||
self.assertIn("not a promise for any one trail", text)
|
||||
|
||||
def test_the_glossary_no_longer_says_only_some_records_state_a_season(self):
|
||||
|
||||
Reference in new issue
Block a user