BIT Mesra · M.tech CSE : Rohit kumar mandal
SVM Diagnostic 3D: Breast Cancer Detection Simulator.
Explore the SVM pipeline for breast cancer classification using a custom synthetic regional dataset from Jharkhand.
01 · Abstract & Overview
Abstract & Overview
This project evaluates a Support Vector Machine with an RBF kernel on a custom synthetic regional dataset of 569 records across six Jharkhand regions. Five features — age, tumor size, lymph-node status, family history and BMI — are used to classify benign and malignant cases. SVM is compared with a Decision Tree baseline.
Data note. The 569 records shown here are synthetic demonstration data, not real patient or hospital records. The dataset schema is Patient_ID, Region, Age, Tumor_Size_mm, Lymph_Node_Status, Family_History, BMI and Diagnosis. The 3D hyperplane and decision surfaces are illustrative teaching visualizations, not a fitted clinical model. The reported evaluation metrics are from the project's 80:20 train-test experiment.
02 · The Dataset
The Dataset
Each sphere represents one synthetic record in (Age, Tumor Size, BMI) space. Teal = benign, coral = malignant. Click a sphere for details; filter by region, diagnosis and age.
Dataset distribution
03 · SVM Theory
SVM Theory — the RBF hyperplane
Maximum margin
An SVM picks the boundary that leaves the widest possible street between classes. Only the points on the street edge — the support vectors — define it.
Kernel trick
The RBF kernel measures similarity as exp(−γ‖xᵢ−xⱼ‖²), letting a linear separator in feature space become a curved surface in the original space.
C and γ
C trades margin width for training errors (soft → hard). γ sets how local each support vector's influence is, and so how wiggly the surface gets.
04 · ML Pipeline
ML Pipeline — step by step
Pick a stage below or click a node in 3D. The camera flies to the node and the matching visualization appears in the panel.
05 · Results & Metrics
Results & Metrics
Hover a bar for precision, recall and F1. The SVM is compared with a Decision Tree baseline.
Classification metrics — SVM (malignant = positive class)
| Metric | Value | Meaning |
|---|---|---|
| Accuracy | 88.60% | 101 / 114 correct |
| Precision | 81.63% | 40 / 49 predicted malignant |
| Recall | 90.91% | 40 / 44 actual malignant |
| F1-score | 86.02% | Harmonic mean of precision and recall |
The test set contains 114 records. Malignant is treated as the positive class. Metrics shown here are accuracy 88.60%, precision 81.63%, recall 90.91% and F1-score 86.02%. The Decision Tree baseline achieved 84.21% accuracy. The dataset is synthetic and these results are not clinical validation.
06 · Confusion Matrix
Confusion Matrix — 114 test records
Cube volume is proportional to patient count. The red false-negative cube pulses every two seconds — a missed cancer is the costliest error. Click a cube (or use the buttons below) for details.
07 · Decision Boundary
Decision Boundary — confidence surface
Age vs Tumor Size. Height and colour show the predicted probability of malignancy (green = benign, red = malignant). Lines mark confidence 0.3, 0.5 and 0.7. Hover or tap the surface to read values.
08 · Feature Correlation
Feature Correlation
Pearson correlations computed on the 569 records. Click any cell for a scatter plot of that feature pair. Bold outlines mark the key findings.
Hover a cell to read it.
09 · Complexity Analysis
Complexity Analysis
Kernel SVM training scales between O(n²) and O(n³) in the number of samples; A Decision Tree is approximately O(n·d·log n). At n = 569 both models are small enough for a quick experiment; larger datasets may change the computational trade-offs.
Training
SVC training can range from roughly O(n²) to O(n³), depending on data and solver behavior. DT training is commonly around O(n·d·log n).
Prediction
SVM: O(n_SV·d) — cost grows with support vectors. DT: O(depth).
Memory
Kernel cache up to O(n²). With 569 records that is only ~2.6 MB of float64.
10 · Limitations & Future Scope
Limitations & Future Scope
Limitations
- Synthetic regional data, 569 records — limited generalisation.
- Five tabular features; no imaging or histopathology.
- Single train/test split, no external validation.
- RBF-SVM is hard to interpret clinically.
- False negatives (4 of 44 malignant test records) are important to monitor.
Future scope
- Multi-centre data across eastern India.
- Cross-validation, calibration and threshold tuning to cut FNs.
- Gradient boosting and ensemble baselines.
- Mammogram / ultrasound features with CNNs.
- SHAP-style explanations for clinicians.
Ethics & deployment
- Decision support, never a replacement for a clinician.
- Audit performance across age and district subgroups.
- Privacy-preserving or federated training.
- Prospective clinical study before use.
11 · Code Explorer
Code Explorer — Listing 1
Core pipeline from the authors' public notebook (Svm.ipynb, plotting cells omitted). Click any line to see which pipeline stage it belongs to.
This code explorer presents the project's SVM model and Decision Tree baseline. The input CSV is synthetic regional demonstration data; no real patient data is used.