Binary Cosmic Evolution Algorithm for optimization problems
Project description
Binary Cosmic Evolution Optimization (B-CEO)
A Python package for multi-objective feature selection using a novel binarized version of the Cosmic Evolution Optimization (CEO) algorithm.
This package is designed to find optimal feature subsets that maximize classification accuracy while simultaneously minimizing the number of selected features.
📖 Background: The Problem
In machine learning, the "Curse of Dimensionality" refers to the problems that arise when dealing with high-dimensional data (datasets with many features). High feature counts can lead to model overfitting, slow training times, and poor generalization.
Feature selection is the process of identifying the most relevant subset of features to build a model, improving performance and reducing complexity. Metaheuristic algorithms are particularly well-suited for this, as they can efficiently explore the vast, complex search space of all possible feature combinations.
[cite_start]This package adapts the Cosmic Evolution Optimization (CEO) algorithm, a powerful physics-based metaheuristic[cite: 4], for this binary optimization task.
🚀 What is BinaryCEO?
This package implements a unique "True-CEO" binarization strategy that remains faithful to the core mathematics of the original paper:
- Continuous Internal State: Each solution ("celestial body") maintains a continuous vector (
continuous_position) that represents its propensity or "probabilistic momentum" for each feature. - Physics-Based Updates: This continuous vector is updated using the paper's original physics-based forces:
- Local Gravitation (Exploitation): A pull toward the local system's leader.
- Global Gravitation (Exploitation): An adaptive pull toward the global best solution.
- Cosmic Expansion (Exploration): A decaying random "jump" to explore the search space.
- Probabilistic Translation: A Sigmoid function translates the continuous vector (e.g.,
[-2.2, 1.5, 0.1]) into a probability vector (e.g.,[0.1, 0.8, 0.5]). - Stochastic Binarization: A "weighted coin flip" based on these probabilities generates the final binary solution (
[0, 1, 1]) to be evaluated.
This approach uses the paper's "natural brake" (where forces weaken as continuous positions converge) and avoids the need for an artificial inertia weight w common in other binarization methods like Binary PSO.
Key Features
- Multi-Objective Fitness: Balances classification accuracy and feature count using a single, weighted objective function.
- Modular Design: Written with a clean, modular structure (Initialization, Partitioning, Update, Selection).
- Local Search: Implements the paper's "Celestial Resonance" as a binary bit-flip local search to refine elite solutions.
- Robust Testing: Type-checked with
mypyand unit-tested withpytest.
📦 Installation
You can install BinaryCEO directly from PyPI:
pip install binaryceo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file binaryceo-0.1.0.tar.gz.
File metadata
- Download URL: binaryceo-0.1.0.tar.gz
- Upload date:
- Size: 43.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28ba1fa89deb14dc1a346fbe5ccccf0eff76c3a8f3c17b1a8bb4ca8146a00874
|
|
| MD5 |
7b9ab0cfa69b9d1f5b8a874010951ee7
|
|
| BLAKE2b-256 |
4e0485aebbb752960f56f3691873f78e67ea1f6c37d2f988e6cb2020e939dd70
|
Provenance
The following attestation bundles were made for binaryceo-0.1.0.tar.gz:
Publisher:
publish.yml on Optimization-MetaheuristicsCEO/BinaryCEO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binaryceo-0.1.0.tar.gz -
Subject digest:
28ba1fa89deb14dc1a346fbe5ccccf0eff76c3a8f3c17b1a8bb4ca8146a00874 - Sigstore transparency entry: 702406264
- Sigstore integration time:
-
Permalink:
Optimization-MetaheuristicsCEO/BinaryCEO@0c44ac1cb831cee34cd2bf3c25293232de8e46fb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Optimization-MetaheuristicsCEO
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c44ac1cb831cee34cd2bf3c25293232de8e46fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file binaryceo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: binaryceo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b39eece0b7bd942ccbab51ff19fa3b5f0973607b8cf900a9d92fae881ce47d6b
|
|
| MD5 |
c013f4f58f633535344b7982d04b6a0f
|
|
| BLAKE2b-256 |
37ef3046ebe987d365f7228946373d7de6c4d8806609de7fc0aeb556694986cb
|
Provenance
The following attestation bundles were made for binaryceo-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Optimization-MetaheuristicsCEO/BinaryCEO
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
binaryceo-0.1.0-py3-none-any.whl -
Subject digest:
b39eece0b7bd942ccbab51ff19fa3b5f0973607b8cf900a9d92fae881ce47d6b - Sigstore transparency entry: 702406265
- Sigstore integration time:
-
Permalink:
Optimization-MetaheuristicsCEO/BinaryCEO@0c44ac1cb831cee34cd2bf3c25293232de8e46fb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Optimization-MetaheuristicsCEO
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c44ac1cb831cee34cd2bf3c25293232de8e46fb -
Trigger Event:
workflow_run
-
Statement type: