Skip to main content

Explosive Generative Model (EGM) classifier

Project description

PyEGM: Explosive Generative Model for Classification

PyEGM is an explosive generative model (EGM) classifier designed for incremental learning. It generates new training points during each iteration and dynamically adjusts its generation strategy based on the input data distribution. This allows it to improve over time and make accurate predictions even as the data evolves.

🌟 Key Features

  • Physics-Inspired Explosive Generation

    • 💥 Energy Allocation: Dirichlet-distributed energy partitioning
    • 🚀 Kinematic Simulation: Velocity derived from kinetic energy formula
    • 🌪️ Directional Dispersion: Random unit vectors with Gaussian noise
  • Dynamic Generation

    • 🔄 Incremental Learning: Seamless updates via partial_fit
    • 🧩 Class-Conditional Generation: Per-class energy allocation
    • 🎛️ Noise Control: Tunable displacement randomness
  • Practical Advantages

    • 🚀 Built-in incremental learning capability
    • 🛡️ Robust to class imbalance through proportional generation
    • ⚡ Efficient neighbor search with NN indexing

Installation

To install PyEGM, you can simply use pip:

pip install pyegm

Usage

If you have PyEGM in your project, you can import it directly:

from pyegm import PyEGM

Model Parameters:

  • num_points: Number of new points generated per class.
  • total_energy: Total energy allocated to each class for the explosion process.
  • mass: Mass of each generated "particle" in the explosion.
  • explosion_time: Duration of the explosion that influences the displacement of the generated points.
  • noise_scale: Standard deviation of the random noise added to each new point.
  • dirichlet_alpha: Concentration parameter for the Dirichlet distribution splitting total energy among the generated points.

Model Methods:

  • fit(X, y):Trains the model and generates new points based on the explosion process. This method combines the new generated points with the original training data.
  • partial_fit(X, y):Allows for incremental training, adding new data points while generating more samples based on the existing model.
  • predict(X):Predicts class labels for the provided input data. This method generates the predicted class labels for the input features.
  • score(X, y):Evaluates the model’s accuracy. This method computes the accuracy of the model based on the test data and true labels.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyegm-0.2.4.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyegm-0.2.4-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file pyegm-0.2.4.tar.gz.

File metadata

  • Download URL: pyegm-0.2.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyegm-0.2.4.tar.gz
Algorithm Hash digest
SHA256 b85a83b63716f98f20b6cc8fab1c68ef1c041ec019337308804e51ccdd827b5a
MD5 63fc43e108b7385e3058741b011353c7
BLAKE2b-256 a4b578866d5d7b5bfd1273da525c6b448b839dbf58531b330d200e64db37bbd1

See more details on using hashes here.

File details

Details for the file pyegm-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: pyegm-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyegm-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9c7936a830c5d0a9fff732509503355a8f64a3f4106608e8e5393c9ada662864
MD5 61756ace381f06927a0ec2ee48c71e4a
BLAKE2b-256 b01027f36005c131d46475a5ca75b845ad72f6186180e85791aba1befc564189

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page