Skip to content

Commit 6a8df85

Browse files
committed
adjust community graph layout
1 parent 3b126d8 commit 6a8df85

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

community/worker.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,14 @@ const addBrainWebToElementWorkerFn = (people, userDisplayName, width, height) =>
216216
const N = matrix2.length;
217217
for(let i=0; i<N; i++) {
218218
for(let j=i; j<N; j++) {
219-
matrix2[i][j] += 0.1;
219+
matrix2[i][j] += 0.5;
220220
}
221221
}
222222

223223
// 2d embedding for display
224-
const umap2 = new UMAP();
224+
const umap2 = new UMAP({
225+
minDist: 0.2
226+
});
225227
const embedding = umap2.fit(matrix2);
226228

227229
// align embedding axes
@@ -251,7 +253,10 @@ const addBrainWebToElementWorkerFn = (people, userDisplayName, width, height) =>
251253
}
252254

253255
// 5d embedding for clustering
254-
const umap5 = new UMAP({nComponents:5});
256+
const umap5 = new UMAP({
257+
nComponents:5,
258+
nNeighbors: 10
259+
});
255260
const embedding5 = umap5.fit(matrix2);
256261
pruneSkillsMatrixBasedOnEmbeddingNearestNeighbours(matrix2, embedding5);
257262

0 commit comments

Comments
 (0)