You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/website/content/news/release_050.md
+31-13Lines changed: 31 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,47 @@ title = "Release 0.5.0"
3
3
date = "2021-10-20"
4
4
+++
5
5
6
-
Release 0.5.0
7
-
8
6
Linfa's 0.5.0 release adds initial support for the OPTICS algorithm, multinomials logistic regression, and the family of nearest neighbor algorithms. Furthermore, we have improved documentation and introduced hyperparameter checking to all algorithms.
9
7
8
+
<!-- more -->
9
+
10
+
## New algorithms
11
+
12
+
[OPTICS](https://en.wikipedia.org/wiki/OPTICS_algorithm) is an algorithm for finding density-based clusters. It can produce reachability-plots, hierarchical structure of clusters. Analysing data without prior assumption of any distribution is a common use-case. The algorithm is added to `linfa-clustering` and an example can be find at [linfa-clustering/examples/optics.rs](https://github.com/rust-ml/linfa/blob/master/algorithms/linfa-clustering/examples/optics.rs).
13
+
14
+
Extending logistic regression to the multinomial distribution generalizes it to [multiclass problems](https://en.wikipedia.org/wiki/Multinomial_logistic_regression). This release adds support for multinomial logistic regression to `linfa-logistic`, you can experiment with the example at [linfa-logistic/examples/winequality_multi.rs](https://github.com/rust-ml/linfa/blob/master/algorithms/linfa-logistic/examples/winequality_multi.rs).
15
+
16
+
Nearest neighbor search finds the set of neighborhood points to a given sample. It appears in numerous fields of applications as a distance metric provider. (e.g. clustering) This release adds a family of nearest neighbor algorithms, namely [Ball tree](https://en.wikipedia.org/wiki/Ball_tree), [K-d tree](https://en.wikipedia.org/wiki/K-d_tree) and naive linear search. You can find an example in the next section.
17
+
18
+
## Improvements
19
+
20
+
* use least-square solver from `ndarray-linalg` in `linfa-linear`
21
+
* make clustering algorithms generic over distance metrics
22
+
* bump `ndarray` to 0.15
23
+
* introduce `ParamGuard` trait for explicit and implicit parameter checking (read more in the [CONTRIBUTE.md](https://github.com/rust-ml/linfa/blob/master/CONTRIBUTE.md#parameters-and-checking))
24
+
* improve documentation in various places
25
+
10
26
## Nearest Neighbors
11
27
12
28
You can now choose from a growing list of NN implementations. The family provides efficient distance metrics to KMeans, DBSCAN etc. The example shows how to use KDTree nearest neighbor to find all the points in a set of observations that are within a certain range of a candidate point.
29
+
30
+
You can query nearest points explicitly:
31
+
13
32
```rust
14
33
// create a KDTree index consisting of all the points in the observations, using Euclidean distance
Or use one of the distance metrics implicitly, here demonstrated for KMeans:
21
40
22
-
Logistic regression models problems with two possible discrete outcomes. Extending this to the multinomial distribution yields the Multinomial Logistic Regression which can model datasets with an arbitrary number of outcomes.
23
-
24
-
We will try to model the winequality of 1440 samples, you can find the full example [here](https://github.com/rust-ml/linfa/blob/master/algorithms/linfa-logistic/examples/winequality_multi.rs)
25
41
```rust
26
-
// fit a Logistic regression model with 150 max iterations
0 commit comments