Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

🩺 Skin Disorder Prediction Using Machine Learning

PRCP-1027 | Multi-Class Classification | AIE Course


👤 Project Info

Field Details
Student Yuvaraj S
Course AIE
Team ID PTID-AIE-APR-26-11148
Contribution Individual

📖 Overview

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.


🎯 Problem Statement

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:

  1. Prepare a complete data analysis report on the given data.
  2. Create a predictive model using machine learning techniques to predict the various classes of skin disease.
  3. Provide suggestions to doctors to identify skin diseases at the earliest.

📊 Dataset

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%)

🏷️ Target Class Distribution

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

🔬 Feature Groups

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).


🔧 Methodology

1. Data Preprocessing

  • Missing Value Imputation: Replaced ? markers in Age column with median imputation
  • Label Encoding: Encoded the target variable using LabelEncoder
  • Feature Scaling: Applied StandardScaler normalization — fitted on training data only to prevent data leakage
  • Train-Test Split: Used stratified sampling (80/20 split) to preserve class distribution

2. Exploratory Data Analysis (EDA)

  • Distribution analysis of clinical and histopathological features
  • Missing value visualization
  • Class balance assessment
  • Correlation heatmap analysis
  • Feature-wise box plots by disease class

3. Model Training & Evaluation

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

4. Hyperparameter Tuning

  • Applied GridSearchCV with stratified k-fold cross-validation
  • Tuned key parameters for each model

5. Advanced Analysis

  • Learning Curve Analysis — bias-variance diagnostics
  • SHAP (SHapley Additive exPlanations) — model-agnostic feature attribution for clinical interpretability

🏆 Results

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.


📁 Repository Structure

📦 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

🛠️ Tech Stack

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

🚀 Getting Started

Prerequisites

pip install numpy pandas matplotlib seaborn scikit-learn xgboost shap

Running the Notebook

  1. Clone this repository:
    git clone https://github.com/<your-username>/Skin-Disorder-Prediction.git
    cd Skin-Disorder-Prediction
  2. Place the dataset CSV file in PRCP-1028-Skin-Disorder-Prediction/ folder
  3. Open and run the notebook:
    jupyter notebook Skin_Disorder_Prediction_Executed.ipynb

💡 Key Insights & Clinical Recommendations

  1. Histopathological features (especially acanthosis, elongation_of_the_rete_ridges, and munro_microabcess) are the most discriminative features — biopsy data significantly improves diagnosis accuracy.
  2. Machine learning models can achieve >97% accuracy in distinguishing the 6 erythemato-squamous diseases, outperforming human clinical assessment alone.
  3. Early identification of Psoriasis (the most common class) can be improved by focusing on knee_and_elbow_involvement, scalp_involvement, and the Koebner phenomenon.
  4. Pityriasis Rubra Pilaris (rarest class, only 20 cases) benefits most from ML assistance due to its overlapping features with Psoriasis.

📄 License

This project is for educational purposes as part of the AIE course (PTID-AIE-APR-26-11148).


Built with ❤️ by Yuvaraj S

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages