-
-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
136 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ poetry.lock | |
|
||
# Generated artifacts of website (with Zola) | ||
docs/website/public/* | ||
docs/website/static/rustdocs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = [ | ||
"Luca Palmieri <[email protected]>", | ||
"Lorenz Schmidt <[email protected]>", | ||
|
@@ -60,7 +60,7 @@ features = ["cblas"] | |
ndarray-rand = "0.11" | ||
approx = { version = "0.3", default-features = false, features = ["std"] } | ||
|
||
linfa-datasets = { version = "0.3.0", path = "datasets", features = ["winequality", "iris", "diabetes", "linnerud"] } | ||
linfa-datasets = { path = "datasets", features = ["winequality", "iris", "diabetes"] } | ||
|
||
[workspace] | ||
members = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-bayes" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["VasanthakumarV <[email protected]>"] | ||
description = "Collection of Naive Bayes Algorithms" | ||
edition = "2018" | ||
|
@@ -15,8 +15,8 @@ ndarray = { version = "0.13" , features = ["blas", "approx"]} | |
ndarray-stats = "0.3" | ||
thiserror = "1" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
|
||
[dev-dependencies] | ||
approx = "0.3" | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["winequality"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["winequality"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-clustering" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
edition = "2018" | ||
authors = [ | ||
"Luca Palmieri <[email protected]>", | ||
|
@@ -36,7 +36,7 @@ sprs = "0.7" | |
num-traits = "0.1.32" | ||
rand_isaac = "0.2.0" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
partitions = "0.2.4" | ||
|
||
[dev-dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-elasticnet" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = [ | ||
"Paul Körbitz / Google <[email protected]>", | ||
"Lorenz Schmidt <[email protected]>" | ||
|
@@ -35,9 +35,9 @@ num-traits = "0.2" | |
approx = "0.3.2" | ||
thiserror = "1" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
|
||
[dev-dependencies] | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["diabetes"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["diabetes"] } | ||
ndarray-rand = "0.11" | ||
rand_isaac = "0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-hierarchical" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Lorenz Schmidt <[email protected]>"] | ||
edition = "2018" | ||
|
||
|
@@ -17,10 +17,10 @@ categories = ["algorithms", "mathematics", "science"] | |
ndarray = { version = "0.13", default-features = false } | ||
kodama = "0.2" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa-kernel = { version = "0.3.0", path = "../linfa-kernel" } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
linfa-kernel = { version = "0.3.1", path = "../linfa-kernel" } | ||
|
||
[dev-dependencies] | ||
rand = "0.7" | ||
ndarray-rand = "0.11" | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["iris"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["iris"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-ica" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["VasanthakumarV <[email protected]>"] | ||
description = "A collection of Independent Component Analysis (ICA) algorithms" | ||
edition = "2018" | ||
|
@@ -31,7 +31,7 @@ ndarray-stats = "0.3" | |
num-traits = "0.2" | ||
rand_isaac = "0.2.0" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
|
||
[dev-dependencies] | ||
ndarray-npy = { version = "0.5", default-features = false } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-kernel" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Lorenz Schmidt <[email protected]>"] | ||
description = "Kernel methods for non-linear algorithms" | ||
edition = "2018" | ||
|
@@ -29,4 +29,4 @@ sprs = { version = "0.9.3", default-features = false } | |
hnsw = "0.6" | ||
space = "0.10" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-linear" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = [ | ||
"Paul Körbitz / Google <[email protected]>", | ||
"VasanthakumarV <[email protected]>" | ||
|
@@ -25,8 +25,8 @@ argmin = {version="0.3.1", features=["ndarrayl"]} | |
serde = { version = "1.0", default-features = false, features = ["derive"] } | ||
thiserror = "1" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
|
||
[dev-dependencies] | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["diabetes"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["diabetes"] } | ||
approx = "0.3.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-logistic" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Paul Körbitz / Google <[email protected]>"] | ||
|
||
description = "A Machine Learning framework for Rust" | ||
|
@@ -20,8 +20,8 @@ num-traits = "0.2" | |
argmin = {version="0.3.1", features=["ndarrayl"]} | ||
serde = "1.0" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
|
||
[dev-dependencies] | ||
approx = "0.3.2" | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["winequality"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["winequality"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-reduction" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Lorenz Schmidt <[email protected]>"] | ||
description = "A collection of dimensionality reduction techniques" | ||
edition = "2018" | ||
|
@@ -30,11 +30,11 @@ ndarray-linalg = "0.12" | |
ndarray-rand = "0.11" | ||
num-traits = "0.2" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa-kernel = { version = "0.3.0", path = "../linfa-kernel" } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
linfa-kernel = { version = "0.3.1", path = "../linfa-kernel" } | ||
|
||
[dev-dependencies] | ||
rand = { version = "0.7", features = ["small_rng"] } | ||
ndarray-npy = { version = "0.5", default-features = false } | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["iris"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["iris"] } | ||
approx = { version = "0.3", default-features = false, features = ["std"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-svm" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
edition = "2018" | ||
authors = ["Lorenz Schmidt <[email protected]>"] | ||
description = "Support Vector Machines" | ||
|
@@ -29,9 +29,9 @@ ndarray-rand = "0.11" | |
num-traits = "0.1.32" | ||
thiserror = "1" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa-kernel = { version = "0.3.0", path = "../linfa-kernel" } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
linfa-kernel = { version = "0.3.1", path = "../linfa-kernel" } | ||
|
||
[dev-dependencies] | ||
linfa-datasets = { version = "0.3.0", path = "../../datasets", features = ["winequality", "diabetes"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets", features = ["winequality", "diabetes"] } | ||
rand_isaac = "0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "linfa-trees" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
edition = "2018" | ||
authors = ["Moss Ebeling <[email protected]>"] | ||
description = "A collection of tree-based algorithms" | ||
|
@@ -27,14 +27,14 @@ features = ["std", "derive"] | |
ndarray = { version = "0.13" , features = ["rayon", "approx"]} | ||
ndarray-rand = "0.11" | ||
|
||
linfa = { version = "0.3.0", path = "../.." } | ||
linfa = { version = "0.3.1", path = "../.." } | ||
|
||
[dev-dependencies] | ||
rand = { version = "0.7", features = ["small_rng"] } | ||
criterion = "0.3" | ||
approx = "0.3" | ||
|
||
linfa-datasets = { version = "0.3.0", path = "../../datasets/", features = ["iris"] } | ||
linfa-datasets = { version = "0.3.1", path = "../../datasets/", features = ["iris"] } | ||
|
||
[[bench]] | ||
name = "decision_tree" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[package] | ||
name = "linfa-datasets" | ||
version = "0.3.0" | ||
version = "0.3.1" | ||
authors = ["Lorenz Schmidt <[email protected]>"] | ||
description = "Collection of small datasets for Linfa" | ||
edition = "2018" | ||
license = "MIT/Apache-2.0" | ||
repository = "https://github.com/rust-ml/linfa" | ||
|
||
[dependencies] | ||
linfa = { version = "0.3.0", path = ".." } | ||
linfa = { version = "0.3.1", path = ".." } | ||
ndarray = { version = "0.13", default-features = false } | ||
ndarray-csv = "0.4" | ||
csv = "1.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
+++ | ||
title = "Release 0.3.1" | ||
date = "2021-03-11" | ||
+++ | ||
|
||
In this release of Linfa the documentation is extended, new examples are added and the functionality of datasets improved. No new algorithms were added. | ||
|
||
<!-- more --> | ||
|
||
The meta-issue [#82](https://github.com/rust-ml/linfa/issues/82) gives a good overview of the necessary documentation improvements and testing/documentation/examples were considerably extended in this release. | ||
|
||
Further new functionality was added to datasets and multi-target datasets are introduced. Bootstrapping is now possible for features and samples and you can cross-validate your model with k-folding. We polished various bits in the kernel machines and simplified the interface there. | ||
|
||
The trait structure of regression metrics are simplified and the silhouette score introduced for easier testing of K-Means and other algorithms. | ||
|
||
|
||
# Changes | ||
|
||
* improve documentation in all algorithms, various commits | ||
* add a website to the infrastructure (c8acc785b) | ||
* add k-folding with and without copying (b0af80546f8) | ||
* add feature naming and pearson's cross correlation (71989627f) | ||
* improve ergonomics when handling kernels (1a7982b973) | ||
* improve TikZ generator in `linfa-trees` (9d71f603bbe) | ||
* introduce multi-target datasets (b231118629) | ||
* simplify regression metrics and add cluster metrics (d0363a1fa8ef) | ||
|
||
# Example | ||
|
||
You can now perform cross-validation with k-folding. @Sauro98 actually implemented two versions, one which copies the dataset into k folds and one which avoid excessive memory operations by copying only the validation dataset around. For example to test a model with 8-folding: | ||
|
||
```rust | ||
// perform cross-validation with the F1 score | ||
let f1_runs = dataset | ||
.iter_fold(8, |v| params.fit(&v).unwrap()) | ||
.map(|(model, valid)| { | ||
let cm = model | ||
.predict(&valid) | ||
.mapv(|x| x > Pr::even()) | ||
.confusion_matrix(&valid).unwrap(); | ||
|
||
cm.f1_score() | ||
}) | ||
.collect::<Array1<_>>(); | ||
|
||
// calculate mean and standard deviation | ||
println!("F1 score: {}±{}", | ||
f1_runs.mean().unwrap(), | ||
f1_runs.std_axis(Axis(0), 0.0), | ||
); | ||
``` |