diff --git a/NEWS.md b/NEWS.md index a93afede..54ae70f9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -27,6 +27,10 @@ in the documentation, and also the rnndescent package's [documentation](https://jlmelville.github.io/rnndescent/index.html) for details. `rnndescent` is only a suggested package, not a requirement, so you need to install it yourself (e.g. via `install.packages("rnndescent")`). +* New function: `umap2`, which acts like `umap` but with modified defaults, +reflecting my experience with UMAP and correcting some small mistakes. See the +[umap2 article](https://jlmelville.github.io/uwot/articles/umap2.html) for more +details. ## Bug fixes and minor improvements diff --git a/R/umap2.R b/R/umap2.R index 2935eb45..0b9e6a58 100644 --- a/R/umap2.R +++ b/R/umap2.R @@ -593,9 +593,6 @@ #' @examples #' #' iris30 <- iris[c(1:10, 51:60, 101:110), ] -#' -#' # Non-numeric columns are automatically removed so you can pass data frames -#' # directly in a lot of cases without pre-processing #' iris_umap <- umap2(iris30, n_neighbors = 5) #' #' @references diff --git a/README.md b/README.md index 5fb65538..02230ecf 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,11 @@ devtools::install_github("jlmelville/uwot") ```R library(uwot) +# umap2 is a version of the umap() function with better defaults +iris_umap <- umap2(iris) + +# but you can still use the umap function (which most of the existing +# documentation does) iris_umap <- umap(iris) # Load mnist from somewhere, e.g. diff --git a/man/umap2.Rd b/man/umap2.Rd index 854ecb49..648dd6db 100644 --- a/man/umap2.Rd +++ b/man/umap2.Rd @@ -43,7 +43,7 @@ umap2( grain_size = 1, tmpdir = tempdir(), verbose = getOption("verbose", TRUE), - batch = FALSE, + batch = TRUE, opt_args = NULL, epoch_callback = NULL, pca_method = NULL, @@ -697,9 +697,6 @@ compatibility. In addition: \examples{ iris30 <- iris[c(1:10, 51:60, 101:110), ] - -# Non-numeric columns are automatically removed so you can pass data frames -# directly in a lot of cases without pre-processing iris_umap <- umap2(iris30, n_neighbors = 5) }