Comments (4)
elbamos
This is a very good question, one of which I myself actually ran into (if I am right here) in trying to implement HDBSCAN.
If you refer to the original OPTICS paper, and I believe in the ELKI implementation (original software implementation of OPTICS) and also in the dbscan packages implementation, the core-distance is actually calculated as the minPts-closest neighbor distance to a point, inclusive of the point itself.
I refer you to check figure 4 in the original OPTICS paper: http://fogo.dbs.ifi.lmu.de/Publikationen/Papers/OPTICS.pdf
I don't know if it was spelled out as explicitly somewhere else in the OPTICS paper, I thought the definitions weren't as strict as what I've seen in the later papers, but it is spelled out in the newer journal paper of HDBSCAN (The 52-page "Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection" paper from 2015).
"Definition 3.1 (Core Distance). The core distance of an object xp ∈ X w.r.t. mpts, dcore(xp), is the distance from xp to its mpts-nearest neighbor (including xp)."
Thus, if you do:
dbscan::optics(dat, eps = 1, minPts = 11, search = "linear")$coredist[1]
[1] 0.3
The other standard dbscan algorithms follow the more standard interpretation or nearest neighbor:
dbscan::kNNdist(dat, k = 10)[1, 10]
0.3
I hope this helps, or perhaps I'm way off the mark, just something I've noticed.
from dbscan.
I think you are correct... this is the path I've been trying to track down since I posted the question.
On Sep 21, 2016, at 9:45 PM, Matt Piekenbrock [email protected] wrote:
elbamos
This is a very good question, one of which I myself actually ran into (if I am right here) in trying to implement HDBSCAN.
If you refer to the original OPTICS paper, and I believe in the ELKI implementation (original software implementation of OPTICS) and also in the dbscan packages implementation, the core-distance is actually calculated as the minPts-closest neighbor distance to a point, inclusive of the point itself.
I refer you to check figure 4 in the original OPTICS paper: http://fogo.dbs.ifi.lmu.de/Publikationen/Papers/OPTICS.pdf
I don't know if it was spelled out as explicitly somewhere else in the OPTICS paper, I thought the definitions weren't as strict as what I've seen in the later papers, but it is spelled out in the newer journal paper of HDBSCAN (The 52-page "Hierarchical Density Estimates for Data Clustering, Visualization, and Outlier Detection" paper from 2015).
"Definition 3.1 (Core Distance). The core distance of an object xp ∈ X w.r.t. mpts, dcore(xp), is the distance from xp to its mpts-nearest neighbor (including xp)."
Thus, if you do:
dbscan::optics(dat, eps = 1, minPts = 11, search = "linear")$coredist[1]
[1] 0.3The other standard dbscan algorithms follow the more standard interpretation or nearest neighbor:
dbscan::kNNdist(dat, k = 10)[1, 10]
0.3I hope this helps, or perhaps I'm way off the mark, just something I've noticed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from dbscan.
Just as a follow up to this answer.
If you were wondering why they defined core distance like that, although I can't speak for the original authors, I believe it was probably to maintain the interpretation of the minPts parameter to mean the minimum number of points to constitute a cluster, as from the original DBSCAN idea.
Consider the following:
dat <- data.frame(x=runif(5), y=runif(5)) res <- dbscan::dbscan(dat, eps = 1, minPts = 5) # Can check against fpc::dbscan as well dbscan::hullplot(x = dat, res)
This code will produce 1 cluster of all 5 randomly generated points, however:
res <- dbscan::dbscan(dat, eps = 1, minPts = 6) # Can check against fpc::dbscan as well dbscan::hullplot(x = dat, res)
Marks all of the points as noise (which makes sense, since there are less points that minimum cluster size). If you use minPts = 5 with an exclusive core distance calculation, the semantics behind the interpretation of minPts is changed
from dbscan.
Yes, it makes perfect sense. I'm now getting matching core distances, the order is off considerably, but reachability distances are either the same to many significant digits or lower. I may ask again if it doesn't resolve.
from dbscan.
Related Issues (20)
- NA values on parameters in dbscan HOT 1
- hdbscan, distance matrix HOT 3
- Segmentation fault in HDBSCAN when clustering a large(?) dataset HOT 1
- some strange results of sNN function HOT 7
- Discrepancies in outlier score between HDBSCAN R and python HOT 7
- Implement Density-Based Clustering Validation (DBCV) HOT 2
- BD-trees
- DBSCAN with categorica/factor/dummy variables HOT 1
- hdbscan HOT 2
- LOF edge case HOT 2
- LOF fails after upgrading to dbscan 1.1-6 HOT 2
- Possible Memory Leak HOT 2
- kNN crashing (segfault) when matrix has Inf values HOT 1
- mrdist error in large datasets HOT 3
- frNN object created from scratch couldn't be used in dbscan HOT 6
- Error in mrd(x_dist, coredist) : number of mutual reachability distance values and size of the distances do not agree. HOT 6
- DBSCAN for trajectories HOT 4
- Getting an error when using predict: x has to be a numeric matrix. HOT 2
- may you clarify is multi-density clustering is implemented, since it is mentioned on references ? HOT 1
- R session aborted in pointdensity() HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbscan.