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.

569Records
6Regions
5Features
455 / 114Train / Test
88.60%SVM accuracy
Drag to orbit · wheel / pinch to zoom · click a node to fly to it

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.

Click a point · drag to orbit · pinch / wheel to zoom
Benign (351)Malignant (218)Axes: Age (years) · Tumor size (mm) · BMI (kg/m²)

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.

K(xᵢ, xⱼ) = exp(−γ‖xᵢ − xⱼ‖²)γ = 1.00
Frosted glass = decision surface · green / red = margin planes · white = support vectors
Support vectors (18)Benign-side marginMalignant-side margin

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.

Click a node · particles show data flowing left → right

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)

MetricValueMeaning
Accuracy88.60%101 / 114 correct
Precision81.63%40 / 49 predicted malignant
Recall90.91%40 / 44 actual malignant
F1-score86.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.

Click a cube · rows = actual, columns = predicted

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.

Hover the surface…
Contours: 0.3 · 0.5 · 0.7
BenignUncertainMalignantProbabilities come from a kernel-smoothed classifier over the 569 records (illustrative).

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.

Select a line.

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.