Engineering lab / Interactive technical portfolio
Synthetic demonstrationManufacturing ML workbench
Predict batch risk. Inspect mistakes. Decide where to investigate.
Factory and quality workspaces
All records below are fictional; no employer or customer engagement is implied.
Batch nonconformance risk
95.3%
At least 1 of 24 pieces outside diameter limits
Inspection recommendation
Escalate
Add dimensional inspection; retain all quality gates
Flag when predicted batch risk ≥ threshold. A score below the threshold never bypasses inspection.
Upcoming fictional batch — no measured outcome. Prediction is a demonstration, not release evidence.
SYN-VS25 / M1 / cutoff before machining
Pre-start inputs
| Feature | Recorded input | Timing |
|---|---|---|
| Prior tool cuts | 168 cuts | Cumulative cuts already completed before this batch |
| Commanded feed | 0.2 mm/rev | Planned machine command |
| Commanded cutting speed | 180 m/min | Planned machine command |
| Pre-start coolant flow | 6.2 L/min | Reading taken before machining |
| Pre-start coolant temperature | 26.4 °C | Reading taken before machining |
| Commanded setup offset | 8 µm | Commanded preset; not a first-off diameter measurement |
| Incoming material hardness | 218 HB | Incoming measurement recorded before machining |
Edit a hypothetical batch
Editing forks an unobserved scenario. It does not change the training history or attach historical outcomes to altered inputs.
Association / not a root-cause finding
How the model arrived here
- Commanded feed / mm/rev: +2.246 log-odds relative to the training mean.
- Pre-start coolant flow / L/min: +1.943 log-odds relative to the training mean.
- Commanded cutting speed / m/min: +1.921 log-odds relative to the training mean.
- Prior tool cuts / cuts: +1.674 log-odds relative to the training mean.
These are fitted model contributions or tree rules. They do not establish causation. Missing readings use training medians plus indicators; no final diameter or downstream disposition is an input.
Prediction → inspection support → measured evidence
The target is a batch event, not a unit defect percentage. Containment and release still require physical evidence and authorized decisions.
Final holdout / 144 complete batches / 23 positive batches
Test what generalizes
Current threshold and costs explore this fixed holdout. The validation-selected reference stays frozen: Logistic regression at 20.0%. Adjustments after inspecting holdout outcomes are not a new unseen benchmark.
Recall / positives detected
39.1%
9 / 23 positive batches
Precision / flagged positives
90.0%
9 / 10 flagged batches; undefined if none
Additional inspection
10 / 144
Flagged batches / all holdout batches
Assumed cost proxy
$2,700
Flagged × inspection + missed positives × exposure
True positives
9
False positives
1
False negatives
14
True negatives
120
| Model | Precision | Recall | TP / FP / FN / TN | Brier ↓ | Log loss ↓ | Cost proxy |
|---|---|---|---|---|---|---|
| Prevalence baseline | Undefined | 0.0% | 0 / 0 / 23 / 121 | 0.1441 | 0.5010 | $4,140 |
| Logistic regression | 90.0% | 39.1% | 9 / 1 / 14 / 120 | 0.1054 | 0.4076 | $2,700 |
| Decision tree | 64.3% | 39.1% | 9 / 5 / 14 / 116 | 0.1178 | 0.8379 | $2,772 |
Brier measures squared probability error. Log loss strongly penalizes confident mistakes. Smaller is better; neither alone proves reliable calibration. Models were chosen on validation Brier, not holdout scores.
Frozen reference results and model selection
| Model | Validation Brier | Holdout Brier | Holdout recall | TP / FP / FN / TN |
|---|---|---|---|---|
| Prevalence baseline | 0.0342 | 0.1441 | 0.0% | 0 / 0 / 23 / 121 |
| Logistic regression | 0.0148 | 0.1054 | 39.1% | 9 / 1 / 14 / 120 |
| Decision tree | 0.0268 | 0.1178 | 39.1% | 9 / 5 / 14 / 116 |
All frozen confusion counts use the same validation-selected 20% threshold and $18 / $180 assumptions. Only 5 validation batches were positive, so model and threshold selection is uncertain. No refit on validation or holdout.
| Candidate | Parameters | Validation Brier |
|---|---|---|
| logistic | C=0.1 | 0.01838 |
| logistic | C=1 | 0.01477 |
| logistic | C=10 | 0.01504 |
| tree | depth=3; minimum leaf=16 | 0.02947 |
| tree | depth=3; minimum leaf=32 | 0.02684 |
| tree | depth=4; minimum leaf=16 | 0.02698 |
| tree | depth=4; minimum leaf=32 | 0.02684 |
Calibration / five fixed bins
Are predicted probabilities credible?
| Probability bin | Batches | Mean prediction | Observed positives |
|---|---|---|---|
| 0.0%–20.0% upper exclusive | 134 | 1.4% | 10.4% |
| 20.0%–40.0% upper exclusive | 5 | 32.6% | 80.0% |
| 40.0%–60.0% upper exclusive | 2 | 54.1% | 100.0% |
| 60.0%–80.0% upper exclusive | 1 | 78.7% | 100.0% |
| 80.0%–100.0% inclusive | 2 | 84.9% | 100.0% |
A well-calibrated model lies near the diagonal. Bin size is shown; tiny bins are unstable. These are raw probabilities, with no calibration fit on the holdout.
Inspection effort / missed positive batches
What does a threshold trade?
Assumptions, not financial results: additional inspection detects every flagged defect; no credit for detection by standard inspection. False negatives are missed flags, not demonstrated customer escapes. Fixed overhead and actual disposition costs are excluded.
Threshold counts and assumed costs / 49 points
| Threshold | Precision | Recall | Flagged | Missed positive | Cost proxy |
|---|---|---|---|---|---|
| 2.0% | 56.3% | 78.3% | 32 / 144 | 5 / 23 | $1,476 |
| 4.0% | 63.0% | 73.9% | 27 / 144 | 6 / 23 | $1,566 |
| 6.0% | 70.0% | 60.9% | 20 / 144 | 9 / 23 | $1,980 |
| 8.0% | 78.6% | 47.8% | 14 / 144 | 12 / 23 | $2,412 |
| 10.0% | 84.6% | 47.8% | 13 / 144 | 12 / 23 | $2,394 |
| 12.0% | 84.6% | 47.8% | 13 / 144 | 12 / 23 | $2,394 |
| 14.0% | 84.6% | 47.8% | 13 / 144 | 12 / 23 | $2,394 |
| 16.0% | 90.9% | 43.5% | 11 / 144 | 13 / 23 | $2,538 |
| 18.0% | 90.0% | 39.1% | 10 / 144 | 14 / 23 | $2,700 |
| 20.0% | 90.0% | 39.1% | 10 / 144 | 14 / 23 | $2,700 |
| 22.0% | 90.0% | 39.1% | 10 / 144 | 14 / 23 | $2,700 |
| 24.0% | 88.9% | 34.8% | 9 / 144 | 15 / 23 | $2,862 |
| 26.0% | 88.9% | 34.8% | 9 / 144 | 15 / 23 | $2,862 |
| 28.0% | 88.9% | 34.8% | 9 / 144 | 15 / 23 | $2,862 |
| 30.0% | 87.5% | 30.4% | 8 / 144 | 16 / 23 | $3,024 |
| 32.0% | 87.5% | 30.4% | 8 / 144 | 16 / 23 | $3,024 |
| 34.0% | 87.5% | 30.4% | 8 / 144 | 16 / 23 | $3,024 |
| 36.0% | 87.5% | 30.4% | 8 / 144 | 16 / 23 | $3,024 |
| 38.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 40.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 42.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 44.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 46.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 48.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 50.0% | 100.0% | 21.7% | 5 / 144 | 18 / 23 | $3,330 |
| 52.0% | 100.0% | 17.4% | 4 / 144 | 19 / 23 | $3,492 |
| 54.0% | 100.0% | 17.4% | 4 / 144 | 19 / 23 | $3,492 |
| 56.0% | 100.0% | 17.4% | 4 / 144 | 19 / 23 | $3,492 |
| 58.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 60.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 62.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 64.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 66.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 68.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 70.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 72.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 74.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 76.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 78.0% | 100.0% | 13.0% | 3 / 144 | 20 / 23 | $3,654 |
| 80.0% | 100.0% | 8.7% | 2 / 144 | 21 / 23 | $3,816 |
| 82.0% | 100.0% | 8.7% | 2 / 144 | 21 / 23 | $3,816 |
| 84.0% | 100.0% | 4.3% | 1 / 144 | 22 / 23 | $3,978 |
| 86.0% | 100.0% | 4.3% | 1 / 144 | 22 / 23 | $3,978 |
| 88.0% | Undefined | 0.0% | 0 / 144 | 23 / 23 | $4,140 |
| 90.0% | Undefined | 0.0% | 0 / 144 | 23 / 23 | $4,140 |
| 92.0% | Undefined | 0.0% | 0 / 144 | 23 / 23 | $4,140 |
| 94.0% | Undefined | 0.0% | 0 / 144 | 23 / 23 | $4,140 |
| 96.0% | Undefined | 0.0% | 0 / 144 | 23 / 23 | $4,140 |
| 98.0% | Undefined | 0.0% | 0 / 144 | 23 / 23 | $4,140 |
Chronology / hidden from model inputs
Investigate the changed condition
Blue line: predicted batch risk. Dashed line: inspection threshold. × marks a batch with a final dimensional nonconformance.
At batch 625, the generator introduces an unobserved +18 µm thermal offset and a flow reading that overstates actual coolant by 1.2 L/min. Missingness also increases. The model sees the pre-start readings, never the hidden condition. The highlighted segment illustrates failure under a changed process.
| Segment | Batches | Positive batches | Recall | False negatives | Brier |
|---|---|---|---|---|---|
| nominal / 577–624 | 48 | 3 | 100.0% | 0 | 0.0135 |
| changed / 625–720 | 96 | 20 | 30.0% | 14 | 0.1514 |
14 / 144 heldout batches
| Inspect batch | Risk | Nonconforming / 24 pieces | Outcome | Condition |
|---|---|---|---|---|
| 17.2% | 1 / 24 | FN | changed | |
| 6.5% | 12 / 24 | FN | changed | |
| 1.2% | 3 / 24 | FN | changed | |
| 4.8% | 1 / 24 | FN | changed | |
| 0.1% | 1 / 24 | FN | changed | |
| 3.1% | 2 / 24 | FN | changed | |
| 6.6% | 1 / 24 | FN | changed | |
| 5.8% | 3 / 24 | FN | changed | |
| 1.8% | 1 / 24 | FN | changed | |
| 4.2% | 2 / 24 | FN | changed | |
| 0.4% | 1 / 24 | FN | changed | |
| 0.7% | 2 / 24 | FN | changed | |
| 15.6% | 4 / 24 | FN | changed | |
| 7.3% | 3 / 24 | FN | changed |
Independent synthetic demonstration / actual trained models
Engineering case record & reproducibility
- Problem & scope
- Prioritize dimensional inspection for upcoming valve batches in this fictional cooling-skid operation. Independent 720-batch learning history; 17,280 synthetic final diameters.
- Responsibility & approach
- This demonstration presents data generation, feature/cutoff design, offline model training, evaluation and browser inference. It is separate from documented professional work and AutoOps AI.
- Decisions & implementation
- Use whole chronological batches, training-only median imputation and missing indicators. Scale logistic inputs on training data only. Compare a prevalence baseline, L2 logistic regression and a shallow tree to handle nonlinear relationships. Export fitted parameters for local inference; no remote AI API.
- Measured synthetic result
- Frozen logistic policy: 9 true positives, 1 false positive, 14 false negatives and 120 true negatives across 144 heldout batches. Precision 90%; recall 39.1%. These are synthetic evaluation outcomes, not real customer results.
- Lessons & next evidence
- Few positive validation batches and a changed process limit confidence. Model associations do not diagnose a cause. Real use needs representative, permissioned data, validated measurement systems, prospective evaluation, drift monitoring and accountable inspection decisions.
| Split | Batch sequence | Batches / pieces | Positive batches | Missing input cells |
|---|---|---|---|---|
| train | 1–432 | 432 / 10368 | 26 | 69 |
| validation | 433–576 | 144 / 3456 | 5 | 14 |
| holdout | 577–720 | 144 / 3456 | 23 | 18 |
All 24 pieces remain in their parent batch. Final diameters, nonconforming counts, target, batch sequence, split, hidden condition, NCR and FAT dispositions are excluded from prediction inputs. The 32-run improvement experiment and original SPC records remain separate.
Method references: training-only preprocessing and probability calibration from scikit-learn documentation.
Factory planning scenario and reset
factory-1.0 · Synthetic operation
Plan: 8 skids / 54.8 h assumed work. Baseline: 8 skids / 54.8 h.
This tab retains your scenario and demo reviews. Reset factory restores the original state.
One connected perspective
Physical requirements become data. Data becomes evidence. Evidence informs an operational decision. These demonstrations connect my manufacturing and quality foundation with the systems thinking used in enterprise transformation and product engineering.
Professional context
Explore my documented manufacturing experience, SAP readiness work and data and product development. The synthetic lab is separate from those professional records.
Download technical README