Skip to content

Commit

Permalink
CRAN submission.
Browse files Browse the repository at this point in the history
  • Loading branch information
mhahsler committed Jun 28, 2024
1 parent 9616151 commit 99758b3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Package: dbscan
Version: 1.1-12-1
Date: 2023-xx-xx
Version: 1.2-0
Date: 2024-06-28
Title: Density-Based Spatial Clustering of Applications with Noise (DBSCAN)
and Related Algorithms
Authors@R: c(person("Michael", "Hahsler", role = c("aut", "cre", "cph"),
email = "[email protected]"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-2716-1405")),
person("Matthew", "Piekenbrock", role = c("aut", "cph")),
person("Sunil", "Arya", role = c("ctb", "cph")),
person("David", "Mount", role = c("ctb", "cph")))
Expand Down
13 changes: 7 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# dbscan 1.1-12-1 (2024-xx-xx)
# dbscan 1.2-0 (2024-06-28)

## New Features
* dbscan has now tidymodels tidiers (glance, tidy, augment).
* kNNdistplot can now plot a range of k/minPts values.
* added stats::nobs methods for the clusterings.
* kNN and frNN now contains the used distance metric.
* dbscan has now tidymodels tidiers (glance, tidy, augment).

## Changes
* Reorganized the C++ source code.
* README now used bibtex.
* dbscan component dist was renamed to metric.
* Removed redundant sort in kNNdistplot (reported by Natasza Szczypien).
* Refactor: use more performant anyNA(x) instead of any(is.na(x)) (by m-muecke).
* Refactoring use more performant anyNA(x) instead of any(is.na(x))
and many more (by m-muecke).
* Reorganized the C++ source code.
* README now uses bibtex.
* Tests use now testthat edition 3 (m-muecke).
* dbscan component dist was renamed to metric.

# dbscan 1.1-12 (2023-11-28)

Expand Down
1 change: 0 additions & 1 deletion R/hdbscan.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ hdbscan <- function(x,
## Generate membership 'probabilities' using core distance as the measure of density
prob <- rep(0, length(cl))
for (cid in sl) {
ccl <- res[[as.character(cid)]]
max_f <- max(coredist[which(cl == cid)])
pr <- (max_f - coredist[which(cl == cid)]) / max_f
prob[cl == cid] <- pr
Expand Down
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ library(tidyverse)
db <- x %>% dbscan(eps = .42, minPts = 5)
```

Get cluster statistics
Get cluster statistics as a tibble

```{r tidyverse2}
tidy(db)
```

Visualize the clustering with ggplot2
Visualize the clustering with ggplot2 (use an x for noise points)
```{r tidyverse3}
augment(db, x) %>%
ggplot(aes(x = Petal.Length, y = Petal.Width)) +
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,21 +238,21 @@ db <- x %>%
dbscan(eps = 0.42, minPts = 5)
```

Get cluster statistics
Get cluster statistics as a tibble

``` r
tidy(db)
```

## # A tibble: 4 × 3
## cluster size noise
## <fct> <int> <fct>
## <fct> <int> <lgl>
## 1 0 29 TRUE
## 2 1 48 FALSE
## 3 2 37 FALSE
## 4 3 36 FALSE

Visualize the clustering with ggplot2
Visualize the clustering with ggplot2 (use an x for noise points)

``` r
augment(db, x) %>%
Expand Down

0 comments on commit 99758b3

Please sign in to comment.