Skip to main content

A Python package for Echo State Network experiments.

Project description

esn-lab: A Python Package for Echo State Network Experiments

日本語 | English

Overview

esn-lab is a Python package developed for efficiently conducting research and experiments using Echo State Networks (ESN).

It was created for my university research and is designed to allow flexible experiment management based on configuration files.
While it includes some general implementations, it also has implementations tailored to specific domains.
It also serves as a portfolio showcasing my development skills.

Currently, it has implemented the basic functionalities required for research, but I plan to continue its development to grow it into a more versatile tool.

✨ Features

  • Flexible Experiment Management via Configuration Files: Manage model parameters and training data using YAML format configuration files.
  • Ensuring Reproducibility: Automatically saves the runtime configuration to enhance experiment reproducibility.
  • Multiple Execution Modes: Aims to support a wide range of experimental scenarios, from training/prediction on a single data point to batch processing of multiple data, and hyperparameter search using 10-fold cross-validation.
  • Easy Operation via CLI: Intuitively execute training, prediction, and evaluation processes through the command-line interface (CLI).

📦 Installation

pip install esn-lab

🚀 Usage

1.Initialize Configuration Files

First, run the following command to generate a configs directory in the current directory.

esnlab init

This will copy the templates for various configuration files.

2. Edit Configuration Files

Describe the basic settings common to the entire project in configs/base.yaml.

project: "esn-research"
seeds: [2024, 706, 4410, 5385, 1029, 1219, 8380, 8931, 5963, 19800]
num_of_classes: 3

data:
    type: "complement"

model:
    name: "esn"
    Nu: 256
    Nx: 100
    Ny: 3
    density: 0.5
    input_scale: 0.01
    rho: 0.9
    optimizer: "tikhonov"

Next, edit the respective configuration file, such as configs/train/single.yaml, according to the mode you want to run.

id: "sample_001"
path: "/path/to/your/data/sample_001.jpg"
class_id: 0

3. Run Training

To train on a single piece of data, run the following command.

esnlab train single

When training is complete, the results (weight files and logs) will be saved in the artifacts/runs/{execution_datetime}_{mode}-{variant}/ directory.

🛠️ Command Line Interface

esn-lab supports the following modes and variants.

Mode Variant Description
train single Train on a single dataset.
batch Train on multiple datasets at once.
tenfold Perform 10-fold cross-validation to explore hyperparameters.
predict single Make predictions using a single dataset.
batch Make predictions using multiple datasets at once.
evaluate run Evaluate prediction results.
summary Plot a confusion matrix summarizing the 10-fold cross-validation results.
tenfold Perform inference on test data using the 10-fold cross-validation results.

Roadmap

This project is still under development. The following feature enhancements are planned for the future.

  • Enhanced Evaluation Functions: Generation of confusion matrices and visualization of more detailed evaluation metrics.

  • Integration of Visualization Tools: Functions to visualize the learning process and the internal state of the reservoir.

Dependencies

  • numpy
  • matplotlib
  • pandas
  • opencv-python
  • PyYAML
  • omegaconf
  • networkx

License

This project is licensed under the MIT License.

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

esn_lab-0.1.0.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

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

esn_lab-0.1.0-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file esn_lab-0.1.0.tar.gz.

File metadata

  • Download URL: esn_lab-0.1.0.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for esn_lab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2cc8c990ece0de546408e7690e286f972c582abcd1dc77c4803924657d81719e
MD5 183129839bcbb986b443146a463a7c0c
BLAKE2b-256 67c07cf8a389757faaf4367bf39920f140e5a652f6c6d5c2cfb2487b3995139e

See more details on using hashes here.

File details

Details for the file esn_lab-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: esn_lab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for esn_lab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b32fd7d6766809250b5df4ef3877bc3a6b23245a45927c24af74ca24d7cccafd
MD5 481c9392d00ef0edd165ce5e6de2c882
BLAKE2b-256 cdbacaf8e8c14066d3486f5806ead4ffdf9092d866e6177c250599b29bc1cb57

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