Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
Version 0.8.1 - 2025-12-22
==========================
New Algorithms
--------------
* Least angle regression in a new `linfa-lars` crate by [@aswin-1111]
* Random Forest in `linfa-ensemble` by [@ladezai]
* AdaBoost in `linfa-ensemble` by [@rathideep22]

Changes
-------
* add bootstrap-with-indices utilities for `Dataset`
* fix ndarray version mismatch
* fix missing exponential in `linfa-ica`

Version 0.8.0 - 2025-09-30
==========================
New Algorithms
--------------
* Bernouilli naive bayes in [linfa-bayes] by [@wildart]
* Bootstrap aggregation (aka Bagging) in new ensemble methods crate [linfa-ensemble] by [@jk1015]
* Bernouilli naive bayes in `linfa-bayes` by [@wildart]
* Bootstrap aggregation (aka Bagging) in new ensemble methods crate `linfa-ensemble` by [@jk1015]

Changes
-------
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "linfa"
version = "0.8.0"
version = "0.8.1"
authors = [
"Luca Palmieri <rust@lpalmieri.com>",
"Lorenz Schmidt <bytesnake@mailbox.org>",
Expand Down
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,26 @@ Where does `linfa` stand right now? [Are we learning yet?](http://www.arewelearn
`linfa` currently provides sub-packages with the following algorithms:


| Name | Purpose | Status | Category | Notes |
| :--- | :--- | :---| :--- | :---|
| [bayes](algorithms/linfa-bayes/) | Naive Bayes | Tested | Supervised learning | Contains Bernouilli, Gaussian and Multinomial Naive Bayes |
| [clustering](algorithms/linfa-clustering/) | Data clustering | Tested / Benchmarked | Unsupervised learning | Clustering of unlabeled data; contains K-Means, Gaussian-Mixture-Model, DBSCAN and OPTICS |
| [ensemble](algorithms/linfa-ensemble/) | Ensemble methods | Tested | Supervised learning | Contains bagging |
| [elasticnet](algorithms/linfa-elasticnet/) | Elastic Net | Tested | Supervised learning | Linear regression with elastic net constraints |
| [ftrl](algorithms/linfa-ftrl/) | Follow The Regularized Leader - proximal | Tested / Benchmarked | Partial fit | Contains L1 and L2 regularization. Possible incremental update |
| [hierarchical](algorithms/linfa-hierarchical/) | Agglomerative hierarchical clustering | Tested | Unsupervised learning | Cluster and build hierarchy of clusters |
| [ica](algorithms/linfa-ica/) | Independent component analysis | Tested | Unsupervised learning | Contains FastICA implementation |
| [kernel](algorithms/linfa-kernel/) | Kernel methods for data transformation | Tested | Pre-processing | Maps feature vector into higher-dimensional space |
| [linear](algorithms/linfa-linear/) | Linear regression | Tested | Partial fit | Contains Ordinary Least Squares (OLS), Generalized Linear Models (GLM) |
| [logistic](algorithms/linfa-logistic/) | Logistic regression | Tested | Partial fit | Builds two-class logistic regression models |
| [nn](algorithms/linfa-nn/) | Nearest Neighbours & Distances | Tested / Benchmarked | Pre-processing | Spatial index structures and distance functions |
| [pls](algorithms/linfa-pls/) | Partial Least Squares | Tested | Supervised learning | Contains PLS estimators for dimensionality reduction and regression |
| [preprocessing](algorithms/linfa-preprocessing/) | Normalization & Vectorization| Tested / Benchmarked | Pre-processing | Contains data normalization/whitening and count vectorization/tf-idf |
| [reduction](algorithms/linfa-reduction/) | Dimensionality reduction | Tested | Pre-processing | Diffusion mapping, Principal Component Analysis (PCA), Random projections |
| [svm](algorithms/linfa-svm/) | Support Vector Machines | Tested | Supervised learning | Classification or regression analysis of labeled datasets |
| [trees](algorithms/linfa-trees/) | Decision trees | Tested / Benchmarked | Supervised learning | Linear decision trees |
| [tsne](algorithms/linfa-tsne/) | Dimensionality reduction | Tested | Unsupervised learning | Contains exact solution and Barnes-Hut approximation t-SNE |
| Name | Purpose | Status | Category | Notes |
| :----------------------------------------------- | :--------------------------------------- | :-------------------- | :-------------------- | :---------------------------------------------------------------------------------------- |
| [bayes](algorithms/linfa-bayes/) | Naive Bayes | Tested | Supervised learning | Contains Bernouilli, Gaussian and Multinomial Naive Bayes |
| [clustering](algorithms/linfa-clustering/) | Data clustering | Tested / Benchmarked | Unsupervised learning | Clustering of unlabeled data; contains K-Means, Gaussian-Mixture-Model, DBSCAN and OPTICS |
| [ensemble](algorithms/linfa-ensemble/) | Ensemble methods | Tested | Supervised learning | Contains bagging, random forest and AdaBoost |
| [elasticnet](algorithms/linfa-elasticnet/) | Elastic Net | Tested | Supervised learning | Linear regression with elastic net constraints |
| [ftrl](algorithms/linfa-ftrl/) | Follow The Regularized Leader - proximal | Tested / Benchmarked | Partial fit | Contains L1 and L2 regularization. Possible incremental update |
| [hierarchical](algorithms/linfa-hierarchical/) | Agglomerative hierarchical clustering | Tested | Unsupervised learning | Cluster and build hierarchy of clusters |
| [ica](algorithms/linfa-ica/) | Independent component analysis | Tested | Unsupervised learning | Contains FastICA implementation |
| [kernel](algorithms/linfa-kernel/) | Kernel methods for data transformation | Tested | Pre-processing | Maps feature vector into higher-dimensional space |
| [lars](algorithms/linfa-lars/) | Linear regression | Tested | Supervised learning | Contains Least Angle Regression (LARS) |
| [linear](algorithms/linfa-linear/) | Linear regression | Tested | Supervised learning | Contains Ordinary Least Squares (OLS), Generalized Linear Models (GLM) |
| [logistic](algorithms/linfa-logistic/) | Logistic regression | Tested | Partial fit | Builds two-class logistic regression models |
| [nn](algorithms/linfa-nn/) | Nearest Neighbours & Distances | Tested / Benchmarked | Pre-processing | Spatial index structures and distance functions |
| [pls](algorithms/linfa-pls/) | Partial Least Squares | Tested | Supervised learning | Contains PLS estimators for dimensionality reduction and regression |
| [preprocessing](algorithms/linfa-preprocessing/) | Normalization & Vectorization | Tested / Benchmarked | Pre-processing | Contains data normalization/whitening and count vectorization/tf-idf |
| [reduction](algorithms/linfa-reduction/) | Dimensionality reduction | Tested | Pre-processing | Diffusion mapping, Principal Component Analysis (PCA), Random projections |
| [svm](algorithms/linfa-svm/) | Support Vector Machines | Tested | Supervised learning | Classification or regression analysis of labeled datasets |
| [trees](algorithms/linfa-trees/) | Decision trees | Tested / Benchmarked | Supervised learning | Linear decision trees |
| [tsne](algorithms/linfa-tsne/) | Dimensionality reduction | Tested | Unsupervised learning | Contains exact solution and Barnes-Hut approximation t-SNE |

We believe that only a significant community effort can nurture, build, and sustain a machine learning ecosystem in Rust - there is no other way forward.

Expand All @@ -56,11 +57,11 @@ If this strikes a chord with you, please take a look at the [roadmap](https://gi

Some algorithm crates need to use an external library for linear algebra routines. By default, we use a pure-Rust implementation. However, you can also choose an external BLAS/LAPACK backend library instead, by enabling the `blas` feature and a feature corresponding to your BLAS backend. Currently you can choose between the following BLAS/LAPACK backends: `openblas`, `netblas` or `intel-mkl`.

|Backend | Linux | Windows | macOS |
|:--------|:-----:|:-------:|:-----:|
|OpenBLAS |✔️ |- |- |
|Netlib |✔️ |- |- |
|Intel MKL|✔️ |✔️ |✔️ |
| Backend | Linux | Windows | macOS |
| :-------- | :---: | :-----: | :---: |
| OpenBLAS | ✔️ | - | - |
| Netlib | ✔️ | - | - |
| Intel MKL | ✔️ | ✔️ | ✔️ |

Each BLAS backend has two features available. The feature allows you to choose between linking the BLAS library in your system or statically building the library. For example, the features for the `intel-mkl` backend are `intel-mkl-static` and `intel-mkl-system`.

Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-bayes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ndarray = { version = "0.16", features = ["approx"] }
ndarray-stats = "0.6"
thiserror = "2.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
approx = "0.5"
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-clustering/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ num-traits = "0.2"
rand_xoshiro = "0.6"
space = "0.19"
thiserror = "2.0"
linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-nn = { version = "0.8.0", path = "../linfa-nn" }
noisy_float = "0.2.0"

Expand All @@ -57,7 +57,7 @@ criterion = "0.5"
serde_json = "1"
approx = "0.5"
lax = "=0.17.0"
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }

[[bench]]
name = "k_means"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-elasticnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ num-traits = "0.2"
approx = "0.5"
thiserror = "2.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
linfa-datasets = { version = "0.8.0", path = "../../datasets", features = [
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-ensemble/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ndarray = { version = "0.16", features = ["rayon", "approx"] }
ndarray-rand = "0.15"
rand = "0.8.5"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-trees = { version = "0.8.0", path = "../linfa-trees" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-ftrl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ thiserror = "2.0"
rand = "0.8.5"
rand_xoshiro = "0.6.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
criterion = "0.5"
approx = "0.5"
linfa-datasets = { version = "0.8.0", path = "../../datasets", features = [
"winequality",
] }
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }

[[bench]]
name = "ftrl"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-hierarchical/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ndarray = { version = "0.16" }
kodama = "0.2"
thiserror = "2"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-kernel = { version = "0.8.0", path = "../linfa-kernel" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-ica/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ num-traits = "0.2"
rand_xoshiro = "0.6"
thiserror = "2.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
ndarray-npy = { version = "0.9", default-features = false }
paste = "1.0"
criterion = "0.5"
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }

[[bench]]
name = "fast_ica"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-kernel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ ndarray = "0.16"
num-traits = "0.2"
sprs = { version = "=0.11.2", default-features = false }

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-nn = { version = "0.8.0", path = "../linfa-nn" }
4 changes: 2 additions & 2 deletions algorithms/linfa-lars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ default-features = false
features = ["std", "derive"]

[dependencies]
linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-linalg = { version = "0.2", default-features = false }
linfa-preprocessing = { version = "0.8.0" , path = "../linfa-preprocessing"}
ndarray = { version = "0.16", features = ["approx"] }
Expand All @@ -39,4 +39,4 @@ linfa-datasets = { version = "0.8.0", path = "../../datasets", features = [
] }
approx = "0.5"
ndarray-rand = "0.15"
rand_xoshiro = "0.6"
rand_xoshiro = "0.6"
4 changes: 2 additions & 2 deletions algorithms/linfa-linear/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ argmin = { version = "0.11.0", default-features = false }
argmin-math = { version = "0.5", features = ["ndarray_v0_16-nolinalg"] }
thiserror = "2.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
linfa-datasets = { version = "0.8.0", path = "../../datasets", features = [
Expand All @@ -46,7 +46,7 @@ linfa-datasets = { version = "0.8.0", path = "../../datasets", features = [
approx = "0.5"
criterion = "0.5"
statrs = "0.18"
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }

[[bench]]
name = "ols_bench"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-logistic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ argmin = { version = "0.11.0", default-features = false }
argmin-math = { version = "0.5", features = ["ndarray_v0_16-nolinalg"] }
thiserror = "2.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
approx = "0.5"
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-nn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ thiserror = "2.0"

kdtree = "0.7.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
approx = "0.5"
criterion = "0.5"
rand_xoshiro = "0.6"
ndarray-rand = "0.15"
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }

[[bench]]
name = "nn"
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-pls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ ndarray-rand = "0.15"
num-traits = "0.2"
paste = "1.0"
thiserror = "2.0"
linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }
linfa-datasets = { version = "0.8.0", path = "../../datasets", features = [
"linnerud",
] }
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-preprocessing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ blas = ["ndarray-linalg", "linfa/ndarray-linalg"]
serde = ["serde_crate", "ndarray/serde", "serde_regex"]

[dependencies]
linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
ndarray = { version = "0.16", features = ["approx"] }
ndarray-linalg = { version = "0.17", optional = true }
linfa-linalg = { version = "0.2", default-features = false }
Expand Down Expand Up @@ -52,7 +52,7 @@ iai = "0.1"
curl = "0.4.35"
flate2 = "1.0.20"
tar = "0.4.33"
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }
criterion = "0.5"
statrs = "0.18"

Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-reduction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ num-traits = "0.2"
thiserror = "2.0"
rand = { version = "0.8", features = ["small_rng"] }

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-kernel = { version = "0.8.0", path = "../linfa-kernel" }
sprs = { version = "=0.11.2" }
rand_xoshiro = "0.6.0"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-svm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ndarray-rand = "0.15"
num-traits = "0.2"
thiserror = "2.0"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }
linfa-kernel = { version = "0.8.0", path = "../linfa-kernel" }

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions algorithms/linfa-trees/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ features = ["std", "derive"]
ndarray = { version = "0.16", features = ["rayon", "approx"] }
ndarray-rand = "0.15"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
rand = { version = "0.8", features = ["small_rng"] }
Expand All @@ -36,7 +36,7 @@ approx = "0.5"
linfa-datasets = { version = "0.8.0", path = "../../datasets/", features = [
"iris",
] }
linfa = { version = "0.8.0", path = "../..", features = ["benchmarks"] }
linfa = { version = "0.8.1", path = "../..", features = ["benchmarks"] }

[[bench]]
name = "decision_tree"
Expand Down
2 changes: 1 addition & 1 deletion algorithms/linfa-tsne/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ndarray-rand = "0.15"
bhtsne = "0.4.0"
pdqselect = "=0.1.1"

linfa = { version = "0.8.0", path = "../.." }
linfa = { version = "0.8.1", path = "../.." }

[dev-dependencies]
rand = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion datasets/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-ml/linfa"

[dependencies]
linfa = { version = "0.8.0", path = ".." }
linfa = { version = "0.8.1", path = ".." }
ndarray = { version = "0.16" }
ndarray-csv = "=0.5.3"
csv = "1.1"
Expand Down
35 changes: 35 additions & 0 deletions docs/website/content/news/release_081.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
+++
title = "Release 0.8.1"
date = "2025-12-23"
+++

`linfa 0.8.1` adds random forest, and AdaBoost boosting algorithms in `linfa-ensemble` and least angle regression in a new `linfa-lars` crate.

<!-- more -->

## Improvements and fixes

* `linfa-ica`: fix missing exponential by @lmmx in https://github.com/rust-ml/linfa/pull/426
* `linfa`:
* add bootstrap-with-indices utilities for `Dataset`
* fix ndarray 0.16/0.17 versions mismatch (0.17 not supported)

## New algorithms

### Least Angle regression

Least Angle Regression (LARS) is an algorithm used in regression for high dimensional data.

See [sklearn.linear_model](https://scikit-learn.org/stable/modules/linear_model.html#least-angle-regression)

### Ensemble methods

Ensemble methods combine the predictions of several base estimators built with a given learning algorithm in order to improve generalizability / robustness over a single estimator.

#### Random Forest

See [sklearn.ensemble forest](https://scikit-learn.org/stable/modules/ensemble.html#forest)

#### AdaBoost

See [sklearn.ensemble AdaBoost](https://scikit-learn.org/stable/modules/ensemble.html#adaboost)
Loading
Loading