aprender
Next Generation Machine Learning, Statistics and Deep Learning in PURE Rust
Overview
Aprender is a lightweight, pure Rust machine learning library designed for efficiency and ease of use. Built with EXTREME TDD methodology, it provides reliable implementations of core ML algorithms with comprehensive test coverage.
Features (v0.1.0)
Core Primitives
- Vector - 1D numerical array with statistical operations (mean, sum, dot, norm, variance)
- Matrix - 2D numerical array with linear algebra (matmul, transpose, Cholesky decomposition)
- DataFrame - Named column container for ML data preparation workflows
Machine Learning Models
- LinearRegression - Ordinary Least Squares via normal equations
- KMeans - K-means++ initialization with Lloyd's algorithm
Metrics
- Regression:
r_squared,mse,rmse,mae - Clustering:
silhouette_score,inertia
Installation
Add to your Cargo.toml:
[]
= "0.1.0"
Quick Start
Linear Regression
use *;
K-Means Clustering
use *;
DataFrame Operations
use *;
Examples
Run the included examples:
Quality Metrics
- TDG Score: 94.1/100 (A grade)
- Unit Tests: 120
- Property Tests: 19 (proptest)
- Doc Tests: 13
- Max Cyclomatic Complexity: 5
API Reference
Generate documentation:
License
MIT License - see LICENSE for details.
Contributing
Contributions welcome! Please ensure:
- All tests pass:
cargo test --all - No clippy warnings:
cargo clippy --all-targets - Code is formatted:
cargo fmt