A comparative study of Fuzzy ARTMAP (FAM) and K-Nearest Neighbors (KNN) classifiers on the UCI Breast Cancer Wisconsin Diagnostic dataset, implemented in Python with PyTorch.
Fuzzy ARTMAP is an underexplored neural network architecture with unique properties — incremental learning, category proliferation control, and transparent decision boundaries — that make it compelling for medical classification tasks. This project benchmarks FAM against the widely-used KNN baseline to quantify where adaptive resonance theory provides advantages over instance-based learning.
The comparison evaluates both models across accuracy, precision, recall, F1-score, and training time on the 569-sample breast cancer dataset with 30 features.
UCI Breast Cancer Dataset (569 samples, 30 features)
↓
Preprocessing (StandardScaler, train/test split)
↓
┌────────────────────┬────────────────────┐
│ Fuzzy ARTMAP │ K-Nearest │
│ │ Neighbors │
│ - Vigilance tuning │ - k optimization │
│ - Category growth │ - Distance metrics │
│ - Match tracking │ - Voting scheme │
└────────┬───────────┴──────────┬─────────┘
↓ ↓
Performance Comparison
(Accuracy, Precision, Recall, F1, Time)
git clone https://github.com/cwccie/ML_model_Comparison_fuzzy-artmap-KNN.git
cd ML_model_Comparison_fuzzy-artmap-KNN
# Install dependencies
pip install numpy pandas matplotlib scikit-learn torch ucimlrepo
# Run the comparison
python ml_model_comparison_knearest_fam.pyOr open the Jupyter notebook for an interactive walkthrough:
jupyter notebook ML_Model_Comparison_KNearest_FAM.ipynbML_model_Comparison_fuzzy-artmap-KNN/
├── ml_model_comparison_knearest_fam.py # Main comparison script
├── ML_Model_Comparison_KNearest_FAM.ipynb # Interactive Jupyter notebook
├── ML_Model_Comparison_KNearest_FAM.sh # Ubuntu auto-install script
├── Example_Output-Successful_Run.txt # Sample output reference
└── README.md
- Python 3.8+
- NumPy, Pandas, Matplotlib, scikit-learn, PyTorch, ucimlrepo
This project is related to the SOFAM (Self-Optimizing Fuzzy-ARTMAP) research, which extends Fuzzy ARTMAP with multi-agent hyperparameter optimization for improved classification performance.
Thanks to CharlesPDX for contributions to solving implementation challenges in the Fuzzy ARTMAP code.
MIT License — see LICENSE