Explore more projects

2024

  • AI/ML

Swarm Evolutionary: PSO
 & GA from Scratch

Optimized feature selection on KNN for breast cancer classification using Particle Swarm Optimization and Genetic Algorithm implemented from scratch without third-party libraries.

Swarm Evolutionary: PSO & GA from Scratch

Overview

Optimized feature selection on K-Nearest Neighbors (KNN) for breast cancer classification using Particle Swarm Optimization (PSO) and Genetic Algorithms (GA) implemented entirely from scratch in pure Python and NumPy.

Metrics

MethodFeatures UsedTest Accuracy
KNN Baseline30/3094.74%
KNN + GA (from scratch)17/3095.61%
KNN + PSO (from scratch)14/3095.61%
  • PSO achieved the same accuracy with fewer features (14 vs 17), proving higher optimization efficiency.

Tech Stack: Python, NumPy, Scikit-learn

Last updated on September 16, 2026 at 12:23 PM UTC+7. See Changelog