From 646c58d221be218495410c303551573908f83220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lafage?= Date: Fri, 17 Jan 2025 10:19:24 +0100 Subject: [PATCH] Release version 0.7.1 (#369) * Update changelog * Add news entry * Bump to version 0.7.1 * Add MSRV info * Pin sprs 0.11.1 to avoid several ndarray versions * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * cargo release version 0.7.1 * Add "more" directive in release pages * Add code snippet for random projection --- CHANGELOG.md | 22 +++++++++++++--- Cargo.toml | 4 +-- algorithms/linfa-bayes/Cargo.toml | 6 ++--- algorithms/linfa-clustering/Cargo.toml | 10 +++---- algorithms/linfa-elasticnet/Cargo.toml | 6 ++--- algorithms/linfa-ftrl/Cargo.toml | 8 +++--- algorithms/linfa-hierarchical/Cargo.toml | 8 +++--- algorithms/linfa-ica/Cargo.toml | 6 ++--- algorithms/linfa-kernel/Cargo.toml | 6 ++--- algorithms/linfa-linear/Cargo.toml | 8 +++--- algorithms/linfa-logistic/Cargo.toml | 6 ++--- algorithms/linfa-nn/Cargo.toml | 6 ++--- algorithms/linfa-pls/Cargo.toml | 8 +++--- algorithms/linfa-preprocessing/Cargo.toml | 12 ++++----- algorithms/linfa-reduction/Cargo.toml | 12 ++++----- algorithms/linfa-svm/Cargo.toml | 8 +++--- algorithms/linfa-trees/Cargo.toml | 8 +++--- algorithms/linfa-tsne/Cargo.toml | 8 +++--- datasets/Cargo.toml | 4 +-- docs/website/content/news/release_051.md | 2 ++ docs/website/content/news/release_061.md | 2 ++ docs/website/content/news/release_070.md | 2 ++ docs/website/content/news/release_071.md | 26 +++++++++++++++++++ .../content/snippets/random-projection.md | 17 ++++++++++++ 24 files changed, 135 insertions(+), 70 deletions(-) create mode 100644 docs/website/content/news/release_071.md create mode 100644 docs/website/content/snippets/random-projection.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 13a957773..24960fc87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ +Version 0.7.1 - 2025-01-14 +========================== +New Algorithms +-------------- + * Random Projection added to `linfa-reduction` by [@GBathie] + +Changes +------- + * add `serde` support to `linfa-clustering` + * add accessors for classes in `linfa-logistics` + * add accessors for `Pca` attributes in `linfa-reduction` + * add `wasm-bindgen`feature to use linfa in the browser + * fix covariance update for `GaussianMixtureModel` in `linfa-clustering` + * bump `ndarray-linalg` to 0.16 and `argmin` to 0.9.0 + * bump MSRV to 1.71.1 + Version 0.7.0 - 2023-10-15 -======================== +========================== Changes ----------- * add `array_from_gz_csv` and `array_from_csv` in `linfa-datasets` @@ -178,8 +194,8 @@ New algorithms Version 0.1.2 (2019-11-25) =========================== -New algorithms ------------- +New algorithms +-------------- - First release of `linfa-clustering:v0.1.0` with the `KMeans` algorithm (by [@LukeMathWalker]) - First (real) release of `linfa`, re-exporting `linfa-clustering` (by [@LukeMathWalker]) diff --git a/Cargo.toml b/Cargo.toml index c5552775e..d284d10da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa" -version = "0.7.0" +version = "0.7.1" authors = [ "Luca Palmieri ", "Lorenz Schmidt ", @@ -42,7 +42,7 @@ approx = "0.4" ndarray = { version = "0.15", features = ["approx"] } ndarray-linalg = { version = "0.16", optional = true } -sprs = { version = "0.11", default-features = false } +sprs = { version = "=0.11.1", default-features = false } thiserror = "1.0" diff --git a/algorithms/linfa-bayes/Cargo.toml b/algorithms/linfa-bayes/Cargo.toml index cd4fa60ca..5030a7e45 100644 --- a/algorithms/linfa-bayes/Cargo.toml +++ b/algorithms/linfa-bayes/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-bayes" -version = "0.7.0" +version = "0.7.1" authors = ["VasanthakumarV "] description = "Collection of Naive Bayes Algorithms" edition = "2018" @@ -25,8 +25,8 @@ ndarray = { version = "0.15" , features = ["approx"]} ndarray-stats = "0.5" thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] approx = "0.4" -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = ["winequality"] } +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = ["winequality"] } diff --git a/algorithms/linfa-clustering/Cargo.toml b/algorithms/linfa-clustering/Cargo.toml index 8c3dbfd93..11ba07da9 100644 --- a/algorithms/linfa-clustering/Cargo.toml +++ b/algorithms/linfa-clustering/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-clustering" -version = "0.7.0" +version = "0.7.1" edition = "2018" authors = [ "Luca Palmieri ", @@ -45,20 +45,20 @@ rand_xoshiro = "0.6" space = "0.12" thiserror = "1.0" #partitions = "0.2.4" This one will break in a future version of Rust and has no replacement -linfa = { version = "0.7.0", path = "../.." } -linfa-nn = { version = "0.7.0", path = "../linfa-nn" } +linfa = { version = "0.7.1", path = "../.." } +linfa-nn = { version = "0.7.1", path = "../linfa-nn" } noisy_float = "0.2.0" [dev-dependencies] ndarray-npy = { version = "0.8", default-features = false } -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "generate", ] } criterion = "0.4.0" serde_json = "1" approx = "0.4" lax = "0.15.0" -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } [[bench]] name = "k_means" diff --git a/algorithms/linfa-elasticnet/Cargo.toml b/algorithms/linfa-elasticnet/Cargo.toml index 923dd7c7e..2148c0d11 100644 --- a/algorithms/linfa-elasticnet/Cargo.toml +++ b/algorithms/linfa-elasticnet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-elasticnet" -version = "0.7.0" +version = "0.7.1" authors = [ "Paul Körbitz / Google ", "Lorenz Schmidt ", @@ -37,10 +37,10 @@ num-traits = "0.2" approx = "0.4" thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "diabetes", "linnerud", ] } diff --git a/algorithms/linfa-ftrl/Cargo.toml b/algorithms/linfa-ftrl/Cargo.toml index 1b8abbb87..716fb6476 100644 --- a/algorithms/linfa-ftrl/Cargo.toml +++ b/algorithms/linfa-ftrl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-ftrl" -version = "0.7.0" +version = "0.7.1" authors = ["Liudmyla Kyrashchuk "] description = "A Machine Learning framework for Rust" @@ -32,15 +32,15 @@ thiserror = "1.0" rand = "0.8.5" rand_xoshiro = "0.6.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] criterion = "0.4.0" approx = "0.4" -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "winequality", ] } -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } [[bench]] name = "ftrl" diff --git a/algorithms/linfa-hierarchical/Cargo.toml b/algorithms/linfa-hierarchical/Cargo.toml index fdca29c73..f8aafb7cd 100644 --- a/algorithms/linfa-hierarchical/Cargo.toml +++ b/algorithms/linfa-hierarchical/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-hierarchical" -version = "0.7.0" +version = "0.7.1" authors = ["Lorenz Schmidt "] edition = "2018" @@ -18,10 +18,10 @@ ndarray = { version = "0.15" } kodama = "0.2" thiserror = "1.0.25" -linfa = { version = "0.7.0", path = "../.." } -linfa-kernel = { version = "0.7.0", path = "../linfa-kernel" } +linfa = { version = "0.7.1", path = "../.." } +linfa-kernel = { version = "0.7.1", path = "../linfa-kernel" } [dev-dependencies] rand = "0.8" ndarray-rand = "0.14" -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = ["iris"] } +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = ["iris"] } diff --git a/algorithms/linfa-ica/Cargo.toml b/algorithms/linfa-ica/Cargo.toml index 8ff7bf194..7dcdb7561 100644 --- a/algorithms/linfa-ica/Cargo.toml +++ b/algorithms/linfa-ica/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-ica" -version = "0.7.0" +version = "0.7.1" authors = ["VasanthakumarV "] description = "A collection of Independent Component Analysis (ICA) algorithms" edition = "2018" @@ -34,13 +34,13 @@ num-traits = "0.2" rand_xoshiro = "0.6" thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] ndarray-npy = { version = "0.8", default-features = false } paste = "1.0" criterion = "0.4.0" -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } [[bench]] name = "fast_ica" diff --git a/algorithms/linfa-kernel/Cargo.toml b/algorithms/linfa-kernel/Cargo.toml index f755de63f..e6792a91c 100644 --- a/algorithms/linfa-kernel/Cargo.toml +++ b/algorithms/linfa-kernel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-kernel" -version = "0.7.0" +version = "0.7.1" authors = ["Lorenz Schmidt "] description = "Kernel methods for non-linear algorithms" edition = "2018" @@ -28,5 +28,5 @@ ndarray = "0.15" num-traits = "0.2" sprs = { version = "=0.11.1", default-features = false } -linfa = { version = "0.7.0", path = "../.." } -linfa-nn = { version = "0.7.0", path = "../linfa-nn" } +linfa = { version = "0.7.1", path = "../.." } +linfa-nn = { version = "0.7.1", path = "../linfa-nn" } diff --git a/algorithms/linfa-linear/Cargo.toml b/algorithms/linfa-linear/Cargo.toml index 0dff35144..0c9f7ec6d 100644 --- a/algorithms/linfa-linear/Cargo.toml +++ b/algorithms/linfa-linear/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-linear" -version = "0.7.0" +version = "0.7.1" authors = [ "Paul Körbitz / Google ", "VasanthakumarV ", @@ -37,16 +37,16 @@ argmin = { version = "0.9.0", default-features = false } argmin-math = { version = "0.3", features = ["ndarray_v0_15-nolinalg"] } thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "diabetes", ] } approx = "0.4" criterion = "0.4.0" statrs = "0.16.0" -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } [[bench]] name = "ols_bench" diff --git a/algorithms/linfa-logistic/Cargo.toml b/algorithms/linfa-logistic/Cargo.toml index faf81bab5..a0d25223b 100644 --- a/algorithms/linfa-logistic/Cargo.toml +++ b/algorithms/linfa-logistic/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-logistic" -version = "0.7.0" +version = "0.7.1" authors = ["Paul Körbitz / Google "] description = "A Machine Learning framework for Rust" @@ -31,11 +31,11 @@ argmin-math = { version = "0.3", features = ["ndarray_v0_15-nolinalg"] } thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] approx = "0.4" -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "winequality", ] } rmp-serde = "1" diff --git a/algorithms/linfa-nn/Cargo.toml b/algorithms/linfa-nn/Cargo.toml index f1400c042..f599668b3 100644 --- a/algorithms/linfa-nn/Cargo.toml +++ b/algorithms/linfa-nn/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-nn" -version = "0.7.0" +version = "0.7.1" authors = ["YuhanLiin "] edition = "2018" description = "A collection of nearest neighbour algorithms" @@ -33,14 +33,14 @@ thiserror = "1.0" kdtree = "0.6.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] approx = "0.4" criterion = "0.4.0" rand_xoshiro = "0.6" ndarray-rand = "0.14" -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } [[bench]] name = "nn" diff --git a/algorithms/linfa-pls/Cargo.toml b/algorithms/linfa-pls/Cargo.toml index d582eb79a..13002b8ad 100644 --- a/algorithms/linfa-pls/Cargo.toml +++ b/algorithms/linfa-pls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-pls" -version = "0.7.0" +version = "0.7.1" edition = "2018" authors = ["relf "] description = "Partial Least Squares family methods" @@ -33,11 +33,11 @@ ndarray-rand = "0.14" num-traits = "0.2" paste = "1.0" thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "linnerud", ] } approx = "0.4" diff --git a/algorithms/linfa-preprocessing/Cargo.toml b/algorithms/linfa-preprocessing/Cargo.toml index 6f9687aa8..f6878e081 100644 --- a/algorithms/linfa-preprocessing/Cargo.toml +++ b/algorithms/linfa-preprocessing/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-preprocessing" -version = "0.7.0" +version = "0.7.1" authors = ["Sauro98 "] description = "A Machine Learning framework for Rust" @@ -18,7 +18,7 @@ blas = ["ndarray-linalg", "linfa/ndarray-linalg"] serde = ["serde_crate", "ndarray/serde", "serde_regex"] [dependencies] -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } ndarray = { version = "0.15", features = ["approx"] } ndarray-linalg = { version = "0.16", optional = true } linfa-linalg = { version = "0.1", default-features = false } @@ -29,7 +29,7 @@ ndarray-rand = { version = "0.14" } unicode-normalization = "0.1.8" regex = "1.4.5" encoding = "0.2" -sprs = { version = "0.11.0", default-features = false } +sprs = { version = "=0.11.1", default-features = false } serde_regex = { version = "1.1", optional = true } @@ -41,16 +41,16 @@ default-features = false features = ["std", "derive"] [dev-dependencies] -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "diabetes", "winequality", ] } -linfa-bayes = { version = "0.7.0", path = "../linfa-bayes" } +linfa-bayes = { version = "0.7.1", path = "../linfa-bayes" } iai = "0.1" curl = "0.4.35" flate2 = "1.0.20" tar = "0.4.33" -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } criterion = "0.4.0" statrs = "0.16.0" diff --git a/algorithms/linfa-reduction/Cargo.toml b/algorithms/linfa-reduction/Cargo.toml index 967dfebdf..c1de0c2f9 100644 --- a/algorithms/linfa-reduction/Cargo.toml +++ b/algorithms/linfa-reduction/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-reduction" -version = "0.7.0" +version = "0.7.1" authors = [ "Lorenz Schmidt ", "Gabriel Bathie ", @@ -42,17 +42,17 @@ num-traits = "0.2" thiserror = "1.0" rand = { version = "0.8", features = ["small_rng"] } -linfa = { version = "0.7.0", path = "../.." } -linfa-kernel = { version = "0.7.0", path = "../linfa-kernel" } -sprs = "0.11.1" +linfa = { version = "0.7.1", path = "../.." } +linfa-kernel = { version = "0.7.1", path = "../linfa-kernel" } +sprs = "=0.11.1" rand_xoshiro = "0.6.0" [dev-dependencies] ndarray-npy = { version = "0.8", default-features = false } -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = [ +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = [ "iris", "generate", ] } approx = { version = "0.4" } mnist = { version = "0.6.0", features = ["download"] } -linfa-trees = { version = "0.7.0", path = "../linfa-trees"} +linfa-trees = { version = "0.7.1", path = "../linfa-trees" } diff --git a/algorithms/linfa-svm/Cargo.toml b/algorithms/linfa-svm/Cargo.toml index e2ca1f4f0..3b5e98e40 100644 --- a/algorithms/linfa-svm/Cargo.toml +++ b/algorithms/linfa-svm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-svm" -version = "0.7.0" +version = "0.7.1" edition = "2018" authors = ["Lorenz Schmidt "] description = "Support Vector Machines" @@ -29,10 +29,10 @@ ndarray-rand = "0.14" num-traits = "0.2" thiserror = "1.0" -linfa = { version = "0.7.0", path = "../.." } -linfa-kernel = { version = "0.7.0", path = "../linfa-kernel" } +linfa = { version = "0.7.1", path = "../.." } +linfa-kernel = { version = "0.7.1", path = "../linfa-kernel" } [dev-dependencies] -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = ["winequality", "diabetes"] } +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = ["winequality", "diabetes"] } rand_xoshiro = "0.6" approx = "0.4" diff --git a/algorithms/linfa-trees/Cargo.toml b/algorithms/linfa-trees/Cargo.toml index a627b6fec..a270ec6af 100644 --- a/algorithms/linfa-trees/Cargo.toml +++ b/algorithms/linfa-trees/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-trees" -version = "0.7.0" +version = "0.7.1" edition = "2018" authors = ["Moss Ebeling "] description = "A collection of tree-based algorithms" @@ -27,14 +27,14 @@ features = ["std", "derive"] ndarray = { version = "0.15" , features = ["rayon", "approx"]} ndarray-rand = "0.14" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] rand = { version = "0.8", features = ["small_rng"] } criterion = "0.4.0" approx = "0.4" -linfa-datasets = { version = "0.7.0", path = "../../datasets/", features = ["iris"] } -linfa = { version = "0.7.0", path = "../..", features = ["benchmarks"] } +linfa-datasets = { version = "0.7.1", path = "../../datasets/", features = ["iris"] } +linfa = { version = "0.7.1", path = "../..", features = ["benchmarks"] } [[bench]] name = "decision_tree" diff --git a/algorithms/linfa-tsne/Cargo.toml b/algorithms/linfa-tsne/Cargo.toml index a86dae4af..2cb7ebe7d 100644 --- a/algorithms/linfa-tsne/Cargo.toml +++ b/algorithms/linfa-tsne/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-tsne" -version = "0.7.0" +version = "0.7.1" authors = ["Lorenz Schmidt "] edition = "2018" @@ -20,14 +20,14 @@ ndarray-rand = "0.14" bhtsne = "0.4.0" pdqselect = "=0.1.0" -linfa = { version = "0.7.0", path = "../.." } +linfa = { version = "0.7.1", path = "../.." } [dev-dependencies] rand = "0.8" approx = "0.4" -linfa-datasets = { version = "0.7.0", path = "../../datasets", features = ["iris"] } -linfa-reduction = { version = "0.7.0", path = "../linfa-reduction" } +linfa-datasets = { version = "0.7.1", path = "../../datasets", features = ["iris"] } +linfa-reduction = { version = "0.7.1", path = "../linfa-reduction" } [target.'cfg(not(target_family = "windows"))'.dev-dependencies] mnist = { version = "0.5", features = ["download"] } diff --git a/datasets/Cargo.toml b/datasets/Cargo.toml index f1364a573..77dbdd587 100644 --- a/datasets/Cargo.toml +++ b/datasets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "linfa-datasets" -version = "0.7.0" +version = "0.7.1" authors = ["Lorenz Schmidt "] description = "Collection of small datasets for Linfa" edition = "2018" @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/rust-ml/linfa" [dependencies] -linfa = { version = "0.7.0", path = ".." } +linfa = { version = "0.7.1", path = ".." } ndarray = { version = "0.15" } ndarray-csv = "=0.5.1" csv = "1.1" diff --git a/docs/website/content/news/release_051.md b/docs/website/content/news/release_051.md index bd78a1afa..c4044747c 100644 --- a/docs/website/content/news/release_051.md +++ b/docs/website/content/news/release_051.md @@ -5,6 +5,8 @@ date = "2022-02-28" Linfa's 0.5.1 release fixes errors and bugs in the previous release, as well as removing useless trait bounds on the `Dataset` type. Note that the commits for this release are located in the `0-5-1` branch of the GitHub repo. + + ## Improvements * remove `Float` trait bound from many `Dataset` impls, making non-float datasets usable diff --git a/docs/website/content/news/release_061.md b/docs/website/content/news/release_061.md index 988dc89e4..843db29a4 100644 --- a/docs/website/content/news/release_061.md +++ b/docs/website/content/news/release_061.md @@ -5,6 +5,8 @@ date = "2022-12-03" Linfa's 0.6.1 release mainly consists of fixes to existing algorithms and the overall crate. The Isotonic Regression algorithm has also been added to `linfa-linear`. + + ## Improvements and fixes * Add constructor for `LpDist` in `linfa-nn`. diff --git a/docs/website/content/news/release_070.md b/docs/website/content/news/release_070.md index 584f2f565..a9f4e363d 100644 --- a/docs/website/content/news/release_070.md +++ b/docs/website/content/news/release_070.md @@ -5,6 +5,8 @@ date = "2023-10-15" Linfa's 0.7.0 release mainly consists of improvements to Serde support. It also removes Approximate DBSCAN from `linfa-clustering` due to subpar performance and outdated dependencies. + + ## Improvements and fixes * Add `array_from_gz_csv` and `array_from_csv` in `linfa-datasets`. diff --git a/docs/website/content/news/release_071.md b/docs/website/content/news/release_071.md new file mode 100644 index 000000000..3bf50b45a --- /dev/null +++ b/docs/website/content/news/release_071.md @@ -0,0 +1,26 @@ ++++ +title = "Release 0.7.1" +date = "2025-01-14" ++++ + +Linfa's 0.7.1 release mainly consists of fixes to existing algorithms and the overall crate. The Random Projection algorithm has also been added to `linfa-reduction`. + + + +## Improvements and fixes + + * add `serde` support to `linfa-clustering` + * add accessors for classes in `linfa-logistics` + * add accessors for `Pca` attributes in `linfa-reduction` + * add `wasm-bindgen`feature to use linfa in the browser + * fix covariance update for `GaussianMixtureModel` in `linfa-clustering` + * bump `ndarray-linalg` to 0.16 and `argmin` to 0.9.0 + * bump MSRV to 1.71.1 + +## New algorithms + +Random projections are a simple and computationally efficient way to reduce the dimensionality of the data by trading a controlled amount of accuracy (as additional variance) for faster processing times and smaller model sizes. + +The dimensions and distribution of random projections matrices are controlled so as to preserve the pairwise distances between any two samples of the dataset. + +See also [sklearn.random_projection](https://scikit-learn.org/stable/api/sklearn.random_projection.html) diff --git a/docs/website/content/snippets/random-projection.md b/docs/website/content/snippets/random-projection.md new file mode 100644 index 000000000..00056b1f2 --- /dev/null +++ b/docs/website/content/snippets/random-projection.md @@ -0,0 +1,17 @@ ++++ +title = "Gaussian Random Projection" ++++ +```rust +// Assume we get some training data like MNIST: 60000 samples of 28*28 images (ie dim 784) +let dataset = Dataset::from(Array::::random((60000, 28 * 28), Standard)); + +// We can work in a reduced dimension using a Gaussian Random Projection +let reduced_dim = 100; +let proj = GaussianRandomProjection::::params() + .target_dim(reduced_dim) + .fit(&dataset)?; +let reduced_ds = proj.transform(&dataset); + +println!("New dataset shape: {:?}", reduced_ds.records().shape()); +// -> New dataset shape: [60000, 100] +``` \ No newline at end of file