machine-learningneural-networkclassificationk-means

Tumor RBF Classifier

RBF network with k-means-seeded centers, classifying a synthetic tumor microenvironment dataset with an enclosed, imbalanced class geometry. Best model: 0.9407 test macro-F1, 0.9973 ROC-AUC.

PythonPyTorchscikit-learnNumPypandasMatplotlib
GitHub

Overview

Final project for MATH 5384 Advanced Machine Learning at Lamar University.

I built a biologically inspired synthetic dataset in which the minority class (viable tumor rim, C1) forms an anisotropic ring enclosed by the majority class (immune/stromal infiltrate, C2), deliberately avoiding simple concentric circles. An RBF network with k-means-seeded centers classifies it, and the layers after the RBF stack are set by a hidden_dims option, which allowed a controlled ablation across shallow (no hidden layers), one-layer and two-layer configurations.

Results

  • A single hidden layer (32,) gave the best test macro-F1 (0.9407) and ROC-AUC (0.9973), with the smallest gap between train and test performance.
  • A complexity sweep showed validation performance plateauing at k=10 RBF centers.

The repository contains the data-generation code, the model notebook, its outputs, and the written report.