Binary Particle Swarm Optimization for Feature Selection

Version 1.3 (61.2 KB) by Jingwei Too
Simple algorithm shows how binary particle swarm optimization (BPSO) used in feature selection problem.
Updated 19 Dec 2020

Simple binary particle swarm optimization (BPSO) for feature selection tasks, which can select the potential features to improve the classification accuracy.

The < Main.m file > demos an example on how to use BPSO with classification error rate (computed by KNN) as the fitness function for feature selection problem using benchmark data-set.


Cite As

Too, Jingwei, et al. “A New Co-Evolution Binary Particle Swarm Optimization with Multiple Inertia Weight Strategy for Feature Selection.” Informatics, vol. 6, no. 2, MDPI AG, May 2019, p. 21, doi:10.3390/informatics6020021.

View more styles

Too, Jingwei, et al. “EMG Feature Selection and Classification Using a Pbest-Guide Binary Particle Swarm Optimization.” Computation, vol. 7, no. 1, MDPI AG, Feb. 2019, p. 12, doi:10.3390/computation7010012.

View more styles
MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

See release notes for this release on GitHub:


Improve code for the fitness function


change to hold-out




Changes Vmin=-Vmax




Add convergence plot


To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.