PRCP-1027 | Multi-Class Classification | AIE Course
| Field | Details |
|---|---|
| Student | Yuvaraj S |
| Course | AIE |
| Team ID | PTID-AIE-APR-26-11148 |
| Contribution | Individual |
This project tackles the challenging problem of differential diagnosis of erythemato-squamous skin diseases using machine learning. These diseases share overlapping clinical and histopathological features, making accurate diagnosis difficult for dermatologists. By leveraging 34 clinical and histopathological features from 366 patient records, multiple classification models were trained and evaluated to automatically distinguish between 6 skin disorder classes.
The differential diagnosis of erythemato-squamous diseases is a significant challenge in dermatology. Six diseases — Psoriasis, Seborrheic Dermatitis, Lichen Planus, Pityriasis Rosea, Chronic Dermatitis, and Pityriasis Rubra Pilaris — share many overlapping clinical and histopathological features, making accurate diagnosis difficult.
Tasks:
- Prepare a complete data analysis report on the given data.
- Create a predictive model using machine learning techniques to predict the various classes of skin disease.
- Provide suggestions to doctors to identify skin diseases at the earliest.
| Property | Value |
|---|---|
| Source | Dermatology Dataset (UCI ML Repository) |
| Records | 366 patients |
| Features | 34 clinical + histopathological features |
| Target Classes | 6 skin disorder types |
| Missing Values | 8 ? values in Age column (~2.19%) |
| Class | Disease | Count |
|---|---|---|
| 1 | Psoriasis | 112 |
| 2 | Seborrheic Dermatitis | 61 |
| 3 | Lichen Planus | 72 |
| 4 | Pityriasis Rosea | 49 |
| 5 | Chronic Dermatitis | 52 |
| 6 | Pityriasis Rubra Pilaris | 20 |
Clinical Features (11): erythema, scaling, definite_borders, itching, koebner_phenomenon, polygonal_papules, follicular_papules, oral_mucosal_involvement, knee_and_elbow_involvement, scalp_involvement, family_history
Histopathological Features (22): melanin_incontinence, eosinophils_in_the_infiltrate, PNL_infiltrate, fibrosis_of_the_papillary_dermis, exocytosis, acanthosis, hyperkeratosis, parakeratosis, clubbing_of_the_rete_ridges, elongation_of_the_rete_ridges, thinning_of_the_suprapapillary_epidermis, spongiform_pustule, munro_microabcess, focal_hypergranulosis, disappearance_of_the_granular_layer, vacuolisation_and_damage_of_basal_layer, spongiosis, saw-tooth_appearance_of_retes, follicular_horn_plug, perifollicular_parakeratosis, inflammatory_monoluclear_infiltrate, band-like_infiltrate
Demographic Feature (1): Age
All features (except
Age) are scored on an ordinal scale of 0–3 (0 = absent, 3 = most severe).
- Missing Value Imputation: Replaced
?markers inAgecolumn with median imputation - Label Encoding: Encoded the target variable using
LabelEncoder - Feature Scaling: Applied
StandardScalernormalization — fitted on training data only to prevent data leakage - Train-Test Split: Used stratified sampling (80/20 split) to preserve class distribution
- Distribution analysis of clinical and histopathological features
- Missing value visualization
- Class balance assessment
- Correlation heatmap analysis
- Feature-wise box plots by disease class
Seven classification algorithms were trained and evaluated:
| Model | Description |
|---|---|
| Logistic Regression | Linear baseline model |
| K-Nearest Neighbors (KNN) | Distance-based classifier |
| Decision Tree | Rule-based tree classifier |
| Random Forest | Ensemble bagging classifier |
| SVM (RBF Kernel) | Support Vector Machine |
| Gradient Boosting | Sequential ensemble boosting |
| XGBoost | Optimized gradient boosting |
- Applied GridSearchCV with stratified k-fold cross-validation
- Tuned key parameters for each model
- Learning Curve Analysis — bias-variance diagnostics
- SHAP (SHapley Additive exPlanations) — model-agnostic feature attribution for clinical interpretability
| Metric | Score |
|---|---|
| Best Test Accuracy | 97.3% |
| Weighted F1-Score | 0.973 |
The best model achieved near-perfect classification across all 6 skin disorder classes, demonstrating the viability of ML-aided dermatological diagnosis.
📦 Skin-Disorder-Prediction
┣ 📓 Skin_Disorder_Prediction_Executed.ipynb # Main notebook with full analysis
┣ 📂 PRCP-1028-Skin-Disorder-Prediction/ # Dataset folder
┃ ┗ 📄 dataset_35_dermatology (1).csv # Raw dataset
┗ 📄 README.md # Project documentation
| Library | Purpose |
|---|---|
pandas |
Data manipulation & analysis |
numpy |
Numerical computations |
matplotlib |
Data visualization |
seaborn |
Statistical data visualization |
scikit-learn |
ML models, preprocessing & evaluation |
xgboost |
Gradient boosting classifier |
shap |
Model explainability |
pip install numpy pandas matplotlib seaborn scikit-learn xgboost shap- Clone this repository:
git clone https://github.com/<your-username>/Skin-Disorder-Prediction.git cd Skin-Disorder-Prediction
- Place the dataset CSV file in
PRCP-1028-Skin-Disorder-Prediction/folder - Open and run the notebook:
jupyter notebook Skin_Disorder_Prediction_Executed.ipynb
- Histopathological features (especially
acanthosis,elongation_of_the_rete_ridges, andmunro_microabcess) are the most discriminative features — biopsy data significantly improves diagnosis accuracy. - Machine learning models can achieve >97% accuracy in distinguishing the 6 erythemato-squamous diseases, outperforming human clinical assessment alone.
- Early identification of Psoriasis (the most common class) can be improved by focusing on
knee_and_elbow_involvement,scalp_involvement, and the Koebner phenomenon. - Pityriasis Rubra Pilaris (rarest class, only 20 cases) benefits most from ML assistance due to its overlapping features with Psoriasis.
This project is for educational purposes as part of the AIE course (PTID-AIE-APR-26-11148).
Built with ❤️ by Yuvaraj S