alexdepremia / advanced-density-peaks Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
Sometimes, the dendrogram generation goes in an infinite loop, generating a huge gpl file. Probably we should program again the subroutine graph2 (and simplify it).
I want to use other datasets. How can I get the file with the suffix ".in" in the folder "examples"?
Thank you for your help!
I'm unsure about the part of the code in which borders between clusters are identified (lines 1978-2013)
#!fortran90
do i=1,Nele
if (.not.centquest(i)) then
dmin=maxr
do j=1,Nele
if (cluster(j).ne.cluster(i)) then
d=gDist(i,j)
if (d.lt.dmin) then
dmin=d
jg=j
endif
endif
enddo
if (dmin.le.dc(i)) then
iref=i
k=0
extend=.true.
do while ( (k.lt.Nele).and.extend)
k=k+1
if (cluster(k).eq.cluster(i)) then
if (gDist(k,jg).lt.dmin) extend=.false.
endif
enddo
if (extend) then
candidates_B(i)=cluster(jg)
if (Rho(iref).gt. Bord(cluster(i),cluster(jg))) then
Bord(cluster(i),cluster(jg))=Rho(iref)
Bord(cluster(jg),cluster(i))=Rho(iref)
Bord_err(cluster(i),cluster(jg))=Rho_err(iref)
Bord_err(cluster(jg),cluster(i))=Rho_err(iref)
eb(cluster(i),cluster(jg))=iref
eb(cluster(jg),cluster(i))=iref
endif
endif
endif
endif
enddo
Specifically, the first inner loop
#!fortran90
do j=1,Nele
if (cluster(j).ne.cluster(i)) then
d=gDist(i,j)
if (d.lt.dmin) then
dmin=d
jg=j
endif
endif
enddo
given a point i, will find its nearest neighbour not belonging to cluster(i), which will be labelled ig. Then, the following step is to check if there's any point in cluster(i) closer to ig.
This is similar but not equal to what I read in the arxiv manuscript:
"A point i, belonging to cluster c, is assumed to be at the border between cluster c and c' if its closest point j belonging to c' is within a distance r_k_i and if i is the closest point to j among those belonging to c"
In particular, according to the manuscript definition, given cluster c, and point i, one should consider each of the other clusters, and find the point closest to i for each of the other clusters, then do the second check on each of them.
Am I interpreting any of this wrong?
Sorry if there's something obvious that I'm missing
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.