This project uses machine learning to predict semiconductor manufacturing outcomes using sensor measurement data.
The primary goal is to identify potential manufacturing failures and investigate whether feature selection can improve failure detection performance.
A major challenge in this dataset is class imbalance. Therefore, this project evaluates models using metrics such as Precision, Recall, F1 Score, and ROC-AUC rather than relying only on accuracy.
The objectives of this project are to:
- Predict semiconductor manufacturing outcomes using sensor data.
- Identify potential manufacturing failures.
- Handle missing values and constant features.
- Address class imbalance using SMOTE.
- Compare multiple machine learning models.
- Perform feature selection.
- Identify important sensor measurements.
- Tune model hyperparameters.
- Select and save the final machine learning model.
Raw Sensor Data
↓
Data Exploration
↓
Data Cleaning
↓
Missing Value Handling
↓
Train-Test Split
↓
Feature Scaling
↓
Feature Selection
↓
SMOTE for Class Imbalance
↓
Model Training
↓
Model Evaluation
↓
Final Model Selection
- Python
- Pandas
- NumPy
- Scikit-learn
- Imbalanced-learn
- Matplotlib
- Seaborn
- Jupyter Notebook
- Joblib
- Git and GitHub
The following machine learning models were evaluated:
- Logistic Regression
- Random Forest Classifier
- Support Vector Machine
- Gaussian Naive Bayes
Hyperparameter tuning was also performed for Random Forest using RandomizedSearchCV.
| Model | Accuracy | Precision | Recall | F1 Score | ROC-AUC |
|---|---|---|---|---|---|
| Naive Bayes | 21.34% | 6.87% | 85.71% | 12.72% | 54.74% |
| Logistic Regression | 82.80% | 7.69% | 14.29% | 10.00% | 61.66% |
| Support Vector Machine | 93.31% | 50.00% | 4.76% | 8.70% | 65.61% |
| Random Forest | 93.31% | 0.00% | 0.00% | 0.00% | 75.77% |
The dataset is highly imbalanced.
This means that a model can achieve high overall accuracy by predicting the majority class while failing to identify manufacturing failures.
For this reason, special attention was given to:
- Recall
- F1 Score
- ROC-AUC
SMOTE was used within the machine learning pipeline to address class imbalance while avoiding data leakage.
Feature selection was performed to investigate whether using fewer sensor features could improve model performance.
| Number of Selected Features | F1 Score |
|---|---|
| 25 | 25.24% |
| 50 | 17.58% |
| 100 | 19.05% |
| 150 | 17.14% |
The experiment showed that using the top 25 selected sensor features achieved the highest F1 Score.
This suggests that all available sensor measurements are not necessarily required for effective semiconductor failure prediction.
The final model was selected based primarily on its ability to detect the minority failure class.
| Metric | Final Model Score |
|---|---|
| Accuracy | 75.48% |
| Precision | 15.85% |
| Recall | 61.90% |
| F1 Score | 25.24% |
| ROC-AUC | 76.34% |
Although some models achieved higher overall accuracy, the final model demonstrated:
- The highest F1 Score among the tested configurations.
- Better detection of manufacturing failures.
- A Recall of approximately 62% for the failure class.
- Competitive ROC-AUC performance.
- Effective performance using only 25 selected features.
The final results demonstrate why accuracy alone should not be used to evaluate highly imbalanced manufacturing datasets.
semiconductor-yield-prediction/
│
├── data/
│ └── signal-data.csv
│
├── images/
│ ├── confusion_matrix.png
│ ├── feature_importance.png
│ ├── feature_selection_comparison.png
│ ├── final_model_comparison.png
│ ├── missing_values.png
│ ├── model_comparison.png
│ ├── roc_curve.png
│ └── target_distribution.png
│
├── models/
│ └── semiconductor_yield_final_model.pkl
│
├── notebooks/
│ └── semiconductor_yield_prediction.ipynb
│
├── results/
│ ├── final_model_results.csv
│ ├── final_optimized_model_results.csv
│ └── model_comparison.csv
│
├── README.md
├── requirements.txt
└── .gitignore
git clone https://github.com/sunithaanjali/semiconductor-yield-prediction.gitcd semiconductor-yield-predictionpython -m venv venvFor Windows PowerShell:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen:
.\venv\Scripts\Activate.ps1pip install -r requirements.txtOpen the Jupyter Notebook:
notebooks/semiconductor_yield_prediction.ipynb
Run the notebook cells from top to bottom.
- The dataset is highly imbalanced.
- Accuracy alone can be misleading for semiconductor failure prediction.
- Feature selection improved failure detection performance.
- The top 25 selected sensor features achieved the best experimental F1 Score.
- The final Logistic Regression model achieved a Recall of 61.90% for the failure class.
- A smaller set of important sensor features can provide better performance than using a larger number of features.
Possible future improvements include:
- XGBoost and Gradient Boosting models.
- Precision-Recall curve analysis.
- Decision threshold optimization.
- SHAP-based model explainability.
- Cost-sensitive machine learning.
- Real-time prediction deployment.
- A web application for manufacturing failure prediction.
Sunitha Anjali
Student | Machine Learning Enthusiast