The same settings protocol at StagingBench used no custom prompt or mask in any of 119 runs across 12 tools. Eleven tools contributed 10 records apiece, and one contributed nine. Style was usually Modern or a variant. To audit that part of the protocol, count settings coverage and style coverage independently. A run can have settings marked as recorded while its style field is empty. Architecture drift measures how closely the staged image kept the original walls, windows, and doors. Lower values indicate closer preservation.
The script uses three standard library modules. csv.DictReader reads each row into a dictionary keyed by the header. Keep the quotes around labels such as Bedroom, Modern because the comma is part of the name. Consecutive commas represent an empty style field. Counter tallies the settings flag, and defaultdict collects scores by both the original label and its normalized group. A set of tool IDs per label lets you count how many tools contributed to Contemporary even when the same tool appears across several rooms.
The normalization rule applies casefold() and checks for the substring modern anywhere in the result. In these records, every substring match contains Modern as a word. A case insensitive exact match for Contemporary stays separate, an empty string becomes Unrecorded, and any other label would go to Other. The code preserves the original spelling for the second report. Modern and Modern Living can share a group because of their wording, but that rule only makes the style direction approximately comparable.
import csv
from collections import Counter, defaultdict
from statistics import median
DATA = '''tool,style,settings_recorded,architecture_drift
T01,,no,16.2
T01,Modern,yes,32.9
T01,Modern,yes,9.2
T01,Modern,yes,40.1
T01,Modern,yes,13.7
T01,Modern,yes,43.4
T01,Modern,yes,41.0
T01,Modern,yes,11.6
T01,Modern,yes,13.1
T01,Modern,yes,22.7
T02,,no,11.0
T02,,no,24.1
T02,,no,21.7
T02,,no,56.5
T02,,no,21.4
T02,Modern,yes,26.2
T02,Modern,yes,35.1
T02,Modern,yes,17.4
T02,Modern,yes,9.2
T02,Modern,yes,28.0
T03,,no,28.2
T03,Modern Living,yes,30.6
T03,Modern Office,yes,29.7
T03,Modern Bedroom,yes,29.0
T03,Modern Living,yes,15.5
T03,Modern Bedroom,yes,21.1
T03,Modern Living,yes,18.0
T03,Modern Living,yes,12.6
T03,Modern Bedroom,yes,14.9
T03,Modern Living,yes,20.2
T04,,no,27.1
T04,,no,26.6
T04,,no,33.5
T04,,no,28.8
T04,,no,22.5
T04,,no,21.3
T04,Modern,yes,24.4
T04,Modern,yes,23.5
T04,Modern,yes,26.9
T04,Modern,yes,26.6
T05,,no,29.4
T05,Modern,yes,6.1
T05,Modern,yes,23.6
T05,Modern,yes,61.5
T05,Modern,yes,36.2
T05,Modern,yes,57.3
T05,Modern,yes,30.4
T05,Modern,yes,22.0
T05,Modern,yes,11.4
T05,Modern,yes,19.9
T06,,no,18.1
T06,Modern,yes,23.3
T06,Modern,yes,21.0
T06,Modern,yes,33.3
T06,Modern,yes,14.8
T06,Modern,yes,22.5
T06,Modern,yes,35.2
T06,Modern,yes,27.4
T06,Modern,yes,10.2
T06,Modern,yes,21.2
T07,Modern,yes,25.4
T07,Modern,yes,33.6
T07,Modern,yes,22.9
T07,Modern,yes,50.4
T07,Modern,yes,38.0
T07,Modern,yes,34.9
T07,Modern,yes,46.3
T07,Modern,yes,38.7
T07,Modern,yes,20.4
T07,Modern,yes,28.2
T08,Contemporary,yes,11.4
T08,Contemporary,yes,31.3
T08,Contemporary,yes,26.3
T08,Contemporary,yes,15.1
T08,Contemporary,yes,34.9
T08,Contemporary,yes,16.6
T08,Contemporary,yes,23.5
T08,Contemporary,yes,9.7
T08,Contemporary,yes,5.7
T08,Contemporary,yes,24.5
T09,Modern,yes,13.3
T09,Modern,yes,11.6
T09,Modern,yes,26.4
T09,Modern,yes,10.4
T09,Modern,yes,19.8
T09,Modern,yes,26.0
T09,Modern,yes,18.9
T09,Modern,yes,7.8
T09,Modern,yes,23.3
T09,Modern,yes,21.0
T10,"Living Room, Modern",yes,10.6
T10,"Home Office, Modern",yes,27.8
T10,"Home Office, Modern",yes,7.5
T10,"Bedroom, Modern",yes,6.4
T10,"Living Room, Modern",yes,7.8
T10,"Bedroom, Modern",yes,13.7
T10,"Living Room, Modern",yes,9.7
T10,"Dining Room, Modern",yes,8.9
T10,"Home Office, Modern",yes,3.1
T10,"Living Room, Modern",yes,17.0
T11,,yes,52.8
T11,,yes,27.1
T11,,yes,61.3
T11,Modern,yes,54.5
T11,Modern,yes,7.2
T11,Modern,yes,9.7
T11,Modern,yes,9.2
T11,Modern,yes,35.5
T11,Modern,yes,7.7
T11,Modern,yes,26.6
T12,,no,18.9
T12,Modern,yes,25.4
T12,Modern,yes,19.1
T12,Modern,yes,15.2
T12,Modern,yes,8.0
T12,Modern,yes,16.3
T12,Modern,yes,42.1
T12,Modern,yes,11.8
T12,Modern,yes,15.7
'''
def normalize(label):
name = label.casefold()
if not name:
return "Unrecorded"
if "modern" in name:
return "Modern"
if name == "contemporary":
return "Contemporary"
return "Other"
settings = Counter()
groups = defaultdict(list)
labels = defaultdict(list)
tools = defaultdict(set)
for row in csv.DictReader(DATA.splitlines()):
label = row["style"]
drift = float(row["architecture_drift"])
settings[row["settings_recorded"]] += 1
groups[normalize(label)].append(drift)
labels[label].append(drift)
tools[label].add(row["tool"])
print(f"Records: {sum(settings.values())}")
print(f"Settings recorded: {settings['yes']}")
print(f"Settings missing: {settings['no']}")
print(f"Styles recorded: {sum(len(v) for k, v in labels.items() if k)}")
print(f"Distinct nonempty labels: {sum(bool(k) for k in labels)}")
print(f"Contemporary tools: {len(tools['Contemporary'])}")
for heading, buckets in (("Normalized group", groups), ("Original label", labels)):
print(f"\n{heading} | n | median")
for label, scores in sorted(buckets.items()):
print(f"{label or '(blank)'} | {len(scores)} | {median(scores):.2f}")
Running the script produces the following output.
Records: 119
Settings recorded: 103
Settings missing: 16
Styles recorded: 100
Distinct nonempty labels: 9
Contemporary tools: 1
Normalized group | n | median
Contemporary | 10 | 20.05
Modern | 90 | 21.15
Unrecorded | 19 | 26.60
Original label | n | median
(blank) | 19 | 26.60
Bedroom, Modern | 2 | 10.05
Contemporary | 10 | 20.05
Dining Room, Modern | 1 | 8.90
Home Office, Modern | 3 | 7.50
Living Room, Modern | 4 | 10.15
Modern | 71 | 23.30
Modern Bedroom | 3 | 21.10
Modern Living | 5 | 18.00
Modern Office | 1 | 29.70
Each run contributes one numeric score to each report. The normalized median uses the individual scores from all runs in that group. This matters because averaging the medians of the original labels would give a label used once the same weight as a label used 71 times. Printing the results to two decimal places keeps the half steps that can occur when averaging the two middle scores.
The two coverage counts answer different questions. Of the 19 blank style fields, 16 also lack a settings record and three have settings marked as recorded. Missing settings indicate a gap in the log, with no implication for the tool's capabilities. The median for Contemporary summarizes 10 runs from a single tool, and the original labels have sample sizes ranging from one to 71. Because those sizes differ and labels are tied to the tools that used them, the summaries cannot isolate a style effect on architecture drift.
Top comments (0)