https://github.com/cbueth/infomeasure-rs
Rust library for calculating various information-theoretic measures, including entropy, mutual information, transfer entropy, and more, with support for both discrete and continuous variables. (WIP)
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Repository
Rust library for calculating various information-theoretic measures, including entropy, mutual information, transfer entropy, and more, with support for both discrete and continuous variables. (WIP)
Basic Info
- Host: GitHub
- Owner: cbueth
- Language: Rust
- Default Branch: main
- Size: 75.2 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
infomeasure-rs
infomeasure is a Rust library for computing information-theoretic measures such as entropy, mutual information, and transfer entropy. This project is a Rust implementation of the infomeasure, designed to provide superior performance while maintaining API compatibility.
[!IMPORTANT]
This crate is under development, features will be added step by step.
Features
- Multiple Estimation Techniques: Supports discrete and kernel-based approaches
- Future: all features from the parent pacakge, see infomeasure introduction
- High Performance: Leverages Rust's zero-cost abstractions for efficient computation
- Python Compatibility: Designed to potentially serve as a backend for the Python package
- Modular Design: Easily extensible architecture for adding new estimators and methods
Installation
[!NOTE] As of now infomeasure is not on crates.io, yet.
Add this to your Cargo.toml:
toml
[dependencies]
infomeasure = "0.1.0"
Usage Examples
Calculating Entropy with Gaussian Kernel
```rust use infomeasure::estimators::entropy::Entropy; use ndarray::Array2;
fn main() { // Create or load your data let data = Array2::fromshapevec((1000, 2), vec![/* your data */]).unwrap();
// Calculate entropy with Gaussian kernel
let bandwidth = 0.5;
let entropy = Entropy::nd_kernel_with_type::<2>(
data.clone(),
"gaussian".to_string(),
bandwidth
).global_value();
println!("Entropy: {}", entropy);
} ```
Repository Structure
src/- Main source codeestimators/- Estimation techniques implementationsapproaches/- Specific implementations (discrete, kernel, ...)traits/- Shared interfaces for estimators
benches/- Performance benchmarks using Criteriontests/- Unit and integration testsexamples/- Example usage and demonstrations
Testing and Validation
The project includes a validation crate that compares results with the Python implementation to ensure compatibility and correctness. Run tests with:
bash
cargo test
Benchmarks
Performance benchmarks are available for different estimation methods:
bash
cargo bench
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Owner
- Name: Carlson Büth
- Login: cbueth
- Kind: user
- Location: Palma de Mallorca, Spain
- Website: https://cbueth.de/
- Repositories: 14
- Profile: https://github.com/cbueth
GitHub Events
Total
- Push event: 2
- Create event: 1
Last Year
- Push event: 2
- Create event: 1
Dependencies
- 181 dependencies
- approx 0.5 development
- criterion 0.5 development
- ndarray 0.16 development
- rand 0.8 development
- rand_distr 0.4 development
- kiddo 5.2.0
- ndarray 0.16
- plotters 0.3.7