Skip to content

About

Semiconductor manufacturing yield analysis using the UCI SECOM dataset, with preprocessing, feature selection, imbalanced classification, and explainability.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

Repository files navigation

Semiconductor SECOM Yield Analysis

A validation-focused semiconductor manufacturing data project using the UCI SECOM dataset, covering data-quality checks, fold-safe feature processing, imbalanced classification, repeated cross-validation, cost-sensitive thresholding, and exploratory temporal/drift analysis.

Python · scikit-learn · pandas · SHAP · Imbalanced Classification · Fold-Safe Validation · Repeated CV

1,567 samples · 590 process attributes · 104 Fail · 6.64% Fail rate

이 프로젝트의 핵심 원칙은 결과를 뒷받침하는 검증 프로토콜이 점수만큼 중요하다는 것입니다.

Why This Project

SECOM은 작고, 고차원이며, 결측치가 있고, Fail 비율이 6.64%에 불과한 익명 데이터입니다. 높은 단일 점수만으로 충분하지 않습니다. 전처리와 feature selection의 validation leakage를 통제하고, 운영 비용에 맞춰 threshold를 별도로 결정하며, random CV의 결과가 시간 변화에서도 유지되는지 확인해야 합니다.

Dataset Snapshot

항목 값
Samples 1,567
Numeric process attributes 590
Timestamp field 1
Pass (-1) 1,463
Fail (1) 104
Fail rate 6.64%
Overall missing rate 약 4.53%

주요 품질·전처리 결과는 constant feature 116개, cleaned numeric feature 442개, BH-FDR 0.05 기준 유의 feature 21개입니다. EDA에서는 |r| >= 0.95인 pair가 271개였고 correlation pruning 후 270개 feature가 남았습니다. Historical subset은 Mutual Information 69개와 balanced-RF importance 91개였습니다.

모든 process attribute는 익명입니다. 이를 온도, 압력, 장비 또는 특정 공정 변수로 해석할 수 없습니다.

Validation Architecture

flowchart TD
    A[Raw SECOM Data] --> B[Data Quality Audit]
    B --> C[Random Outer Split]
    C --> H[Historical Notebooks 01-06]
    C --> D[Train-Only Preprocessing]
    D --> E[Fold-Safe Feature Processing]
    E --> F[Model Comparison]
    F --> G[Repeated CV Stability]
    G --> I[Nested Cost Threshold]
    G --> J[Exploratory Temporal + PSI Drift]
    H -. selection before CV within outer-training .-> K[Historical Results]
    I --> L[Scope-Bounded Conclusions]
    J --> L
    K --> L
Loading

Historical Notebook은 분석의 발전 과정을 보여 주지만 feature selection이 outer-training 전체에서 CV보다 먼저 수행됐습니다. 더 엄격한 경로는 transformation과 selection을 각 training fold 안에서 학습합니다.

Key Results

근거 범위 결과 해석 경계
Repeated CV, all-features balanced RF PR-AUC 0.207031 random outer-training 내부 반복 평가
Repeated CV, correlation-pruned RF PR-AUC 0.196414 위 후보와 같은 split 공유
Repeated CV, dummy prior PR-AUC 0.066237 불균형 문제의 기준선
Paired repeated-CV comparison delta +0.010617; 15승 / 10패 작고 일관되지 않은 우위; 25개 fold는 독립 실험이 아님
FN:FP 10:1 threshold policy selected 645 vs default 830 실제 금액이 아닌 예시 비용 단위; calibration 없음
Exploratory forward validation PR-AUC 0.0857–0.1848 독립 미래 생산 검증이 아님

FN:FP 10:1에서 선택 정책의 recall은 0.5181, precision은 0.1493입니다. 불량 누락을 줄이는 대신 추가 검사·재검 대상을 늘리는 trade-off가 있습니다. 서로 다른 평가 범위의 값은 하나의 순위표처럼 비교하지 않습니다.

Results by Evaluation Scope

Evaluation Data / split scope Purpose Main result Interpretation boundary
Historical Notebook random outer-training에서 selection 후 CV; 당시 random hold-out 평가 초기 분석 기록 CV 0.274255; hold-out 0.233475 CV가 완전히 fold-safe하지 않으며 hold-out은 이미 평가됨
Fold-Safe Single CV random outer-training 내부 5-fold, 16개 조합 누수 가능성을 줄인 비교 all-features balanced RF 0.219918 단일 5-fold 탐색 결과
Repeated CV 같은 outer-training 내부 5-fold × 5-repeat, shared splits split 안정성 RF 0.207031; correlation RF 0.196414; HistGB 0.189125; dummy 0.066237 반복 fold의 training 관측치가 겹침
Cost Threshold 각 5-fold outer training에서 3-fold inner OOF 선택 비용별 threshold 민감도 10:1 selected 645 vs default 830 예시 비용 단위; probability calibration 미수행
Temporal + Drift random outer-training 내부 expanding-window 3-split 시간 변화와 drift 탐색 PR-AUC 0.0857, 0.1848, 0.1008; 0.5에서 양성 예측 0건 독립 미래 검증이 아니며 PSI는 원인 증거가 아님

전체 수치와 dataset subset, split, selection 절차는 Results by Evaluation Scope에 정리했습니다.

Engineering / Analysis Decisions

  • 왜 accuracy 대신 PR-AUC인가? Fail이 6.64%뿐이어서 accuracy는 다수 class의 영향을 크게 받습니다.
  • 왜 preprocessing과 selection을 fold 안으로 옮겼는가? Validation 정보가 transformation과 feature 선택에 스며드는 것을 줄이기 위해서입니다.
  • 왜 repeated CV를 수행했는가? 한 번의 split에서 보인 후보 차이가 split 변화에도 안정적인지 확인하기 위해서입니다.
  • 왜 threshold를 모델 품질과 분리했는가? FN/FP trade-off는 모델 점수뿐 아니라 운영 비용 가정에 달려 있기 때문입니다.
  • 왜 약한 temporal 결과도 공개했는가? 배포 관련 주장은 유리한 random split만으로 뒷받침할 수 없기 때문입니다.

What the Results Do Not Mean

이 프로젝트는 인과적인 반도체 공정 변수, 실제 장비 고장 원인, 실제 fab의 수율 개선이나 생산 금액 절감, 독립 미래 제조 성능, 다른 fab·제품으로의 일반화, 익명 feature의 물리적 의미를 입증하지 않습니다.

SHAP은 모델 내부 contribution 설명이지 인과 분석이 아닙니다. PSI는 분포 변화의 heuristic이지 공정 원인이나 장비 고장의 증거가 아닙니다. 익명 attribute를 물리적 공정 의미에 연결하려면 metadata와 domain expert 검토가 필요합니다.

Quick Start

Python 3.13 환경에서 실행했습니다.

py -3.13 -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
jupyter lab

Notebook은 notebooks/01_data_understanding.ipynb부터 notebooks/06_explainability.ipynb까지 번호 순서로 실행합니다. UCI 입력을 처음 불러올 때는 네트워크 연결이 필요합니다.

python scripts/generate_quality_report.py --uci-secom
python scripts/run_fold_safe_modeling.py --uci-secom
python scripts/run_repeated_cv.py --from-validation-results reports/fold_safe_modeling/fold_safe_results.json --all-candidates
python scripts/run_repeated_cv.py --from-validation-results reports/fold_safe_modeling/fold_safe_results.json --finalize
python scripts/run_cost_threshold.py --uci-secom
python scripts/run_temporal_validation.py --uci-secom

상세 data-access 규칙, 옵션과 산출물은 Validation Protocol과 Analysis Pipeline을 참고합니다. 생성 결과는 Git에서 제외된 reports/ 아래에 저장됩니다.

Technical Documentation

Repository Structure

semiconductor-secom-yield-analysis/
├── README.md
├── requirements.txt
├── docs/
│   ├── README.md
│   ├── analysis_pipeline.md
│   ├── validation_protocol.md
│   ├── results_by_scope.md
│   ├── portfolio_case_study.md
│   └── figures/
├── notebooks/              # historical analysis, 01-06
├── scripts/                # quality and validation CLIs
├── src/                    # reusable analysis modules
├── tests/                  # focused unit and CLI tests
├── data/                   # generated/downloaded data ignored
└── reports/                # generated results ignored

Known Limitations

  • SECOM은 작고 불균형하며 익명화되어 있고 제조 metadata가 제한적입니다.
  • Timestamp에는 timezone, 실제 production-order 보장, lot·wafer identifier가 없습니다.
  • Historical Notebook CV에는 selection-before-CV 제한이 있습니다.
  • Repeated folds는 training observation을 공유하므로 25개의 독립 실험이 아닙니다.
  • 비용 단위는 sensitivity analysis용이며 실제 제조 손실이나 금액이 아닙니다.
  • Temporal 평가는 기존 random outer-training 내부의 탐색적 forward validation입니다.

Future Work

  • Lot, wafer, equipment, process-step metadata로 group-aware 및 time-aware leakage를 검증합니다.
  • 별도의 최신 제조 기간과 외부 line에서 모델과 threshold를 독립 검증합니다.
  • Training fold 안에서만 resampling 방법을 비교합니다.
  • 독립 validation에서 probability calibration 필요성을 판단한 뒤 비용 정책을 재검증합니다.
  • 익명 attribute와 실제 공정 변수 mapping은 domain expert 검토가 있을 때만 확장합니다.

Dataset / Citation

데이터는 ucimlrepo.fetch_ucirepo(id=179)로 불러오며 원본·전처리 데이터 파일은 저장소에서 추적하지 않습니다.

McCann, M., & Johnston, A. (2008). SECOM [Dataset]. UCI Machine Learning Repository. https://doi.org/10.24432/C54305

License

Repository code and documentation are available under the MIT License. The SECOM dataset retains its own CC BY 4.0 license.

About

Semiconductor manufacturing yield analysis using the UCI SECOM dataset, with preprocessing, feature selection, imbalanced classification, and explainability.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages