Skip to content

Commit

Permalink
Update NEWS and README for new release.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmelville committed Sep 22, 2018
1 parent 279dc15 commit 4c827f1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
19 changes: 18 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# uwot 0.0.0.9003 (September 22 2018)

## New features

* New parameter `ret_nn`: when `TRUE` returns nearest neighbor matrices
as a `nn` list: indices in item `idx` and distances in item `dist`. Embedded
coordinates are in `embedding`. Both `ret_nn` and `ret_model` can be `TRUE`,
and should not cause any compatibility issues with supervised embeddings.
* `nn_method` can now take precomputed nearest neighbor data. Must be a list of
two matrices: `idx`, containing integer indexes, and `dist` containing
distances. By no coincidence, this is the format return by `ret_nn`.

## Bug fixes and minor improvements

* Embedding to `n_components = 1` was broken (https://github.com/jlmelville/uwot/issues/6)
* User-supplied matrices to `init` parameter were being modified, in defiance of basic R pass-by-copy semantics.

# uwot 0.0.0.9002 (August 14 2018)

## Bug fixes and minor improvements

* `metric = "cosine"` is working again for `n_threads` greater than `0`.
* `metric = "cosine"` is working again for `n_threads` greater than `0` (https://github.com/jlmelville/uwot/issues/5)

# uwot 0.0.0.9001

Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ the basic method.

## News

*August 14 2018*. I had broken `metric = cosine` for all cases except when
specifying `n_threads = 0`. Thanks to [ONeillMB1](https://github.com/ONeillMB1)
for reporting this.
*September 2018*. You can now return the nearest neighbor data via
`umap_result <- umap(..., ret_nn = TRUE)`, and it
can be re-used by setting
`umap_newresult <- umap(..., nn_method = umap_result$nn)`. As the nearest
neighbor calculations is likely to be the bottleneck with default settings, this
can save a lot of time if you are fiddling with epochs, initialization, output
distance functions and so on. It also works with `lvish`.

## Installing

Expand Down Expand Up @@ -50,8 +54,18 @@ mnist_train <- head(mnist, 60000)
mnist_test <- tail(mnist, 70000)

# You must set ret_model = TRUE to return extra data we need
# coordinates are in mnist_train_umap$embedding
mnist_train_umap <- umap(mnist_train, verbose = TRUE, ret_model = TRUE)
mnist_test_umap <- umap_transform(mnist_test, mnist_train_umap, verbose = TRUE)

# Save the nearest neighbor data
mnist_nn <- umap(mnist, ret_nn = TRUE)
# coordinates are now in mnist_nn$embedding

# Re-use the nearest neighor data and save a lot of time
mnist_nn_spca <- umap(mnist, nn_method = mnist_nn$nn, init = spca)

# No problem to have ret_nn = TRUE and ret_model = TRUE at the same time
```

## Documentation
Expand Down

0 comments on commit 4c827f1

Please sign in to comment.