
How AI Flags Glazing Requirements
Read Article
Logistic regression for screening glazing documents
You open a drawing set. Thirty sheets, maybe forty. The bid is due Thursday, and you need to find the safety-glazing notes before pricing the glass.
You scan the schedules and specifications for familiar clues: tempered, laminated, hazardous locations, references to safety-glazing standards. A promising note sends you to the relevant page for a closer look.
A classifier can help with that first pass. Give it a specific question, such as “Does this page contain a safety-glazing requirement?”, and it can estimate the probability that the answer is yes.
Logistic regression is one way to build that classifier. Your judgment provides a useful analogy, but the model works by learning numerical weights from labeled examples.
The first two articles covered data, features, and representations. Here we put those inputs to work.
Ask a Specific Question
Before training anything, decide what the model should predict.
“Does this page contain a safety-glazing requirement?” is a document-screening question. “Is safety glazing required for this installation?” involves more information, including the location, project requirements, and applicable rules.
For this example, we’ll use the screening question. Each training page needs a reviewed label:
1: The page states a safety-glazing requirement.
0: The reviewed page does not state one.
Unreadable or ambiguous pages need separate review. Labeling them zero would teach the model that missing evidence means an absent requirement.
The same care applies when using the model. A negative page prediction does not establish that the entire project has no requirement.
Choose the Signals
The previous article explained how information becomes numerical inputs. For this classifier, we can begin with simple indicators:
Feature | Value of 1 means |
|---|---|
Tempered mentioned | The extracted page text contains “tempered” |
Laminated mentioned | The extracted page text contains “laminated” |
CPSC mentioned | The extracted page text contains “CPSC” |
Hazardous location mentioned | The phrase appears in the extracted text |
These are clues, not complete interpretations. A word might appear in an exclusion, a product description, or a note that applies to another condition.
That is why “tempered” alone is a crude feature. A better extraction could distinguish “provide tempered glass” from “tempered glass not permitted.” It could also record whether the phrase appears in a requirement paragraph or a general description.
Start with features you can verify. If you add “glass near a door,” you need a reliable way to extract that relationship from the drawing. The classifier cannot recover information that never reached its inputs.
How the Score Works
Logistic regression multiplies each feature by a coefficient, adds an intercept, and passes the total through the logistic function. That function produces a number between 0 and 1.[1]
The intercept is the starting score before the feature contributions are added. A positive coefficient raises the score when its feature is present; a negative coefficient lowers it.
Here is a worked example. All coefficients are invented for teaching. They were not learned from construction documents.
Feature | Present? | Coefficient | Contribution |
|---|---|---|---|
Intercept | Always included | −3.0 | −3.0 |
Tempered mentioned | 1 | +2.1 | +2.1 |
Laminated mentioned | 0 | +1.8 | 0 |
CPSC mentioned | 1 | +4.5 | +4.5 |
Hazardous location mentioned | 1 | +3.2 | +3.2 |
Glass near a door | 1 | +2.8 | +2.8 |
Overhead glazing mentioned | 0 | +3.0 | 0 |
Total score | 9.6 |
The logistic function converts 9.6 to approximately 0.99993. That is the probability output of this demonstration model. It is not evidence that a real project has a 99.99% chance of requiring safety glazing.
Now suppose only the “glass near a door” feature is present. The score becomes:
The output is approximately 0.4502, or 45%.
A workflow using a threshold of 0.5 would classify this example as negative. A workflow flagging anything at or above 0.3 would send it for review. The model output is the same; the chosen action changes.
Pick the Review Threshold
A threshold converts the probability output into a classification or action. Lowering it generally flags more examples, catching more positives while also creating more false alarms. Raising it generally reduces false alarms but misses more positives.[2]
For screening safety-glazing notes, the two errors have different costs:
Error | What happened | Possible consequence |
|---|---|---|
False positive | A page without a requirement was flagged | Extra review time |
False negative | A page with a requirement was missed | A requirement could be omitted from the bid |
If a missed requirement is more costly, a lower review threshold may make sense. Choose it using measured results on reviewed pages, rather than selecting 0.3 because it sounds cautious.
RFI screening follows the same logic. If missing an urgent issue is expensive, raising the threshold simply to reduce the queue can make the problem worse. You need to compare the review burden with the consequences of missed issues.
The threshold reflects how you intend to use the result. A flag for someone to inspect a page can tolerate more false positives than an action that automatically changes pricing.
Where the Weights Come From
In a trained model, you do not assign the coefficients by intuition. You provide features and reviewed labels, and training fits the coefficients by minimizing a loss, typically with regularization to discourage overly complex fits.
A large positive coefficient means the feature raises the model’s predicted probability, holding the other features fixed. It does not prove that the feature causes the requirement.
Test the model on projects held out from training. Pages from one bid set often repeat the same language, so splitting that set across training and testing can make performance look better than it will on a new project.
Compare the classifier with a simple keyword search too. If searching for “safety glazing” finds the pages you need just as reliably, the simpler tool may be enough. A model earns its place by handling cases the basic search misses.
Can You Trust the Probability?
Suppose a model assigns 0.8 to a group of pages. If roughly 80% of those pages are positive, its predictions are well calibrated in that range. Calibration checks whether the probability estimates match observed frequencies.[3]
Logistic regression can produce well-calibrated probabilities under suitable conditions. That still needs checking on your data. Changes in document quality, terminology, or project mix can affect the results.[3]
Research comparing learning algorithms has also shown that calibration behavior varies across methods and can sometimes be improved with additional calibration techniques.[4]
Evaluate both the predictions and their probabilities. For screening, recall tells you what fraction of the positive pages the model catches. Precision tells you what fraction of its flags are correct. Calibration helps you judge what the reported probabilities mean.
A score of 0.45 does not mean the model has decided “I don’t know.” An application can route middle-range scores to review, but that is a rule you design. High scores can also be wrong.
From Screening to Estimating
A classifier can help you find pages worth reading. It cannot, by itself, measure glass area or establish that the proposed assembly meets a requirement.
Those tasks need their own inputs and checks. A measurement workflow might use drawing geometry and scale. A compliance review needs the relevant requirements and product information.
For document screening, keep the page reference and extracted evidence with each flag. If text extraction failed, report that failure. Do not turn an unreadable page into a confident “no.”
Used this way, logistic regression can help organize the review queue. You still have enough information to inspect the source and decide what belongs in the bid.
The next article examines quantity extraction from drawings, including the roles of geometry, scale, and verification.
This article is part of a series on machine learning for glass and glazing professionals.
Sources
[1] Google. Logistic regression: Calculating a probability with the sigmoid function. Machine Learning Crash Course.
[2] Google. Thresholds and the confusion matrix. Machine Learning Crash Course.
[3] scikit-learn. Probability calibration. User Guide.
[4] Niculescu-Mizil, A., & Caruana, R. (2005). Predicting good probabilities with supervised learning. Proceedings of the 22nd International Conference on Machine Learning.
Details
Date
Category
ML for Glazing
Reading Time
10 Min
Author

Clair, Pane, and Mica
AI Editorial Team
A&A’s custom AI research and writing team, developed by Dameion Ayers for glass and glazing workflows. Clair coordinates research and retrieves relevant source material through retrieval-augmented generation (RAG) and live internet search. Pane drafts articles using Anthropic models. Mica reviews drafts for clarity, consistency, unsupported claims, and editorial quality using models accessed through OpenAI and OpenRouter. Dameion supplies the trade expertise, directs the work, checks accuracy, and approves each article for publication. The team runs on a DigitalOcean VPS. Hermes supports agent execution, Paperclip manages assignments and reviews, and n8n connects services and automates supporting workflows.


