From ad4cadd8fb513784bddefb3b01e1c45d974833e0 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Wed, 16 Jul 2025 23:51:42 +0100 Subject: [PATCH 1/4] Update version in Cargo.toml and enhance README for clarity and project scope --- Cargo.toml | 2 +- README.md | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ec38c65..b4bdc53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustframe" -version = "0.0.1-a.0" +version = "0.0.1-a.20250716" edition = "2021" license = "GPL-3.0-or-later" readme = "README.md" diff --git a/README.md b/README.md index c0bc452..ee5e2e6 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,17 @@ ## Rustframe: _A lightweight dataframe & math toolkit for Rust_ -Rustframe provides intuitive dataframe, matrix, and series operations small-to-mid scale data analysis and manipulation. +Rustframe provides intuitive dataframe, matrix, and series operations for data analysis and manipulation. Rustframe keeps things simple, safe, and readable. It is handy for quick numeric experiments and small analytical tasks, but it is **not** meant to compete with powerhouse crates like `polars` or `ndarray`. +Rustframe is an educational project, and is not intended for production use. It is a work in progress, and the API is subject to change. There are no guarantees of stability or performance, and it is not optimized for large datasets or high-performance computing. + ### What it offers - **Math that reads like math** - element‑wise `+`, `−`, `×`, `÷` on entire frames or scalars. - **Broadcast & reduce** - sum, product, any/all across rows or columns without boilerplate. - **Boolean masks made simple** - chain comparisons, combine with `&`/`|`, get a tidy `BoolMatrix` back. -- **Date‑centric row index** - business‑day ranges and calendar slicing built in. - **Pure safe Rust** - 100 % safe, zero `unsafe`. ### Heads up @@ -32,7 +33,7 @@ Rustframe keeps things simple, safe, and readable. It is handy for quick numeric - **Not memory‑efficient (yet)** - footprint needs work. - **Feature set still small** - expect missing pieces. -### On the horizon +### Somewhere down the line - Optional GPU help (Vulkan or similar) for heavier workloads. - Straightforward Python bindings using `pyo3`. From 044c3284dfe3b60ba850b6b0f7b0f6b48f69976e Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Thu, 17 Jul 2025 00:09:42 +0100 Subject: [PATCH 2/4] Enhance README with detailed project scope, features, and compute module overview --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ee5e2e6..25408b0 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,43 @@ Rustframe provides intuitive dataframe, matrix, and series operations for data analysis and manipulation. -Rustframe keeps things simple, safe, and readable. It is handy for quick numeric experiments and small analytical tasks, but it is **not** meant to compete with powerhouse crates like `polars` or `ndarray`. +Rustframe keeps things simple, safe, and readable. It is handy for quick numeric experiments and small analytical tasks as well as for educational purposes. It is designed to be easy to use and understand, with a clean API implemented in 100% safe Rust. -Rustframe is an educational project, and is not intended for production use. It is a work in progress, and the API is subject to change. There are no guarantees of stability or performance, and it is not optimized for large datasets or high-performance computing. +Rustframe is an educational project, and is not intended for production use. It is **not** meant to compete with powerhouse crates like `polars` or `ndarray`. It is a work in progress, and the API is subject to change. There are no guarantees of stability or performance, and it is not optimized for large datasets or high-performance computing. ### What it offers +- **Matrix operations** - Element-wise arithmetic, boolean logic, transpose, and more. - **Math that reads like math** - element‑wise `+`, `−`, `×`, `÷` on entire frames or scalars. -- **Broadcast & reduce** - sum, product, any/all across rows or columns without boilerplate. -- **Boolean masks made simple** - chain comparisons, combine with `&`/`|`, get a tidy `BoolMatrix` back. -- **Pure safe Rust** - 100 % safe, zero `unsafe`. +- **Frames** - Column major data structure for single-type data, with labeled columns and typed row indices. +- **Compute module** - Implements various statistical computations and machine learning models. + +- **[Coming Soon]** _DataFrame_ - Multi-type data structure for heterogeneous data, with labeled columns and typed row indices. + +- **[Coming Soon]** _Random number utils_ - Random number generation utilities for statistical sampling and simulations. (Currently using the [`rand`](https://crates.io/crates/rand) crate.) + +#### Matrix and Frame functionality + +- **Matrix operations** - Element-wise arithmetic, boolean logic, transpose, and more. +- **Frame operations** - Column manipulation, sorting, and more. + +#### Compute Module + +The `compute` module provides implementations for various statistical computations and machine learning models. + +**Statistics, Data Analysis, and Machine Learning:** + +- Correlation analysis +- Descriptive statistics +- Distributions +- Inferential statistics + +- Dense Neural Networks +- Gaussian Naive Bayes +- K-Means Clustering +- Linear Regression +- Logistic Regression +- Principal Component Analysis ### Heads up @@ -164,3 +191,11 @@ E.g. to run the `game_of_life` example: ```bash cargo run --example game_of_life ``` + +### Running benchmarks + +To run the benchmarks, use: + +```bash +cargo bench --features "bench" +``` From eb9de0a6473a24519242ce06e1316952d583b505 Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Wed, 16 Jul 2025 19:14:06 -0400 Subject: [PATCH 3/4] Fix typos and improve clarity in README documentation --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 25408b0..f37f334 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ - + 📚 [Docs](https://magnus167.github.io/rustframe/) | 🐙 [GitHub](https://github.com/Magnus167/rustframe) | 🌐 [Gitea mirror](https://gitea.nulltech.uk/Magnus167/rustframe) | 🦀 [Crates.io](https://crates.io/crates/rustframe) | 🔖 [docs.rs](https://docs.rs/rustframe/latest/rustframe/) @@ -24,7 +24,7 @@ Rustframe is an educational project, and is not intended for production use. It ### What it offers - **Matrix operations** - Element-wise arithmetic, boolean logic, transpose, and more. -- **Math that reads like math** - element‑wise `+`, `−`, `×`, `÷` on entire frames or scalars. +- **Math that reads like math** - element-wise `+`, `−`, `×`, `÷` on entire frames or scalars. - **Frames** - Column major data structure for single-type data, with labeled columns and typed row indices. - **Compute module** - Implements various statistical computations and machine learning models. @@ -58,11 +58,11 @@ The `compute` module provides implementations for various statistical computatio ### Heads up - **Not memory‑efficient (yet)** - footprint needs work. -- **Feature set still small** - expect missing pieces. +- **The feature set is still limited** - expect missing pieces. ### Somewhere down the line -- Optional GPU help (Vulkan or similar) for heavier workloads. +- Optional GPU acceleration (Vulkan or similar) for heavier workloads. - Straightforward Python bindings using `pyo3`. --- @@ -79,7 +79,7 @@ use rustframe::{ let n_periods = 4; -// Four business days starting 2024‑01‑02 +// Four business days starting 2024-01-02 let dates: Vec = BDatesList::from_n_periods("2024-01-02".to_string(), DateFreq::Daily, n_periods) .unwrap() @@ -114,13 +114,13 @@ let result: Matrix = result / 2.0; // divide by scalar let check: bool = result.eq_elem(ma.clone()).all(); assert!(check); -// The above math can also be written as: +// Alternatively: let check: bool = (&(&(&(&ma + 1.0) - 1.0) * 2.0) / 2.0) .eq_elem(ma.clone()) .all(); assert!(check); -// The above math can also be written as: +// or even as: let check: bool = ((((ma.clone() + 1.0) - 1.0) * 2.0) / 2.0) .eq_elem(ma.clone()) .all(); From c13fcc99f7dc2f2d2e94a46853b3feed9a3d83df Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Wed, 16 Jul 2025 19:14:45 -0400 Subject: [PATCH 4/4] Remove commented-out dev-dependencies from Cargo.toml --- Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b4bdc53..983cbbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,9 +19,6 @@ rand = "^0.9.1" [features] bench = ["dep:criterion"] -# [dev-dependencies] -# criterion = { version = "0.5", features = ["html_reports"], optional = true } - [[bench]] name = "benchmarks" harness = false