Removed reducing threshold
Signed-off-by: James Ketrenos <james_gitlab@ketrenos.com>
This commit is contained in:
parent
b792446cc9
commit
2fc08a41b0
10
clusters-pre
10
clusters-pre
@ -8,7 +8,7 @@ function loadMore(index) {
|
||||
}
|
||||
var faces = clusterBlock.querySelectorAll("div.face").length, i
|
||||
for (i = faces; i < clusters[index].length; i++) {
|
||||
if (i - faces > 15) {
|
||||
if (i - faces > 10) {
|
||||
return;
|
||||
}
|
||||
var tuple = clusters[index][i],
|
||||
@ -51,18 +51,14 @@ document.addEventListener("DOMContentLoaded", (event) => {
|
||||
document.body.appendChild(clusterBlock);
|
||||
var div = document.createElement("div");
|
||||
var html = "Cluster " + (clusterIndex + 1) + " has " + cluster.length + " neighbors.";
|
||||
if (cluster.length > 15) {
|
||||
if (cluster.length >= 10) {
|
||||
html += " <span class='more' onClick='loadMore(" + clusterIndex + ")'>more</a>";
|
||||
}
|
||||
div.innerHTML = html;
|
||||
clusterBlock.appendChild(div);
|
||||
|
||||
if (clusterIndex > 20) {
|
||||
return;
|
||||
}
|
||||
|
||||
cluster.forEach((tuple, index) => {
|
||||
if (index > 15) {
|
||||
if (index >= 10) {
|
||||
return;
|
||||
}
|
||||
var face = createFace(tuple[0], tuple[1]);
|
||||
|
@ -152,6 +152,7 @@ long int DBSCAN(Face **ppFaces, long int faceCount, float eps, int minPts) {
|
||||
float threshold = eps;
|
||||
FaceLink *pNeighbors = RangeQuery(ppFaces, faceCount, pFace, eps);
|
||||
long neighborCount = chainLength(pNeighbors);
|
||||
/*
|
||||
while (neighborCount > minPts * 5) {
|
||||
threshold *= 0.9;
|
||||
freeChain(pNeighbors);
|
||||
@ -159,6 +160,7 @@ long int DBSCAN(Face **ppFaces, long int faceCount, float eps, int minPts) {
|
||||
neighborCount = chainLength(pNeighbors);
|
||||
fprintf(stderr, "\rWith eps of %f, %ld has %ld neighbors.", threshold, pFace->faceId, neighborCount);
|
||||
}
|
||||
*/
|
||||
|
||||
if (neighborCount < minPts) {
|
||||
pFace->clusterType = NOISE;
|
||||
@ -193,15 +195,16 @@ long int DBSCAN(Face **ppFaces, long int faceCount, float eps, int minPts) {
|
||||
|
||||
FaceLink *pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, eps);
|
||||
neighborCount = chainLength(pSubNeighbors);
|
||||
/*
|
||||
threshold = eps;
|
||||
while (neighborCount > minPts * 5) {
|
||||
while (neighborCount > minPts * 1.25) {
|
||||
threshold *= 0.9;
|
||||
freeChain(pSubNeighbors);
|
||||
pSubNeighbors = RangeQuery(ppFaces, faceCount, pQ, threshold);
|
||||
neighborCount = chainLength(pSubNeighbors);
|
||||
fprintf(stderr, "\rWith eps of %f, %ld has %ld neighbors.", threshold, pQ->faceId, neighborCount);
|
||||
}
|
||||
|
||||
*/
|
||||
if (neighborCount >= minPts) {
|
||||
pQ->clusterType = CORE;
|
||||
/* Append these neighbors to the end of the chain */
|
||||
|
Loading…
x
Reference in New Issue
Block a user