Questions tagged [clustering]
Cluster analysis or clustering is the task of grouping a set of objects in such a way that objects in the same group (called a cluster) are more similar (in some sense or another) to each other than to those in other groups (clusters).
130 questions
3
votes
0
answers
731
views
Rust code implementing cosine similarity
I've been trying to create a piece of code which consists of looping through each element of a list of questions, preprocess it, and then calculate the Cosine similarity with the rest of the elements (...
1
vote
1
answer
67
views
Dividing shared resources for homogeneous multithread processing
I'm trying to implement a homogeneous multithreading example that multiple threads process portion of a huge task. In order to achieve this, I thought of clustering data/resource and multiple threads ...
1
vote
1
answer
393
views
Implement 2D and 1D std::array in opencl kernel
I am asked to implement the following part of code into kernel code. Actually, I have tried but not sure about the std::array.
This is the original code for the ...
0
votes
2
answers
450
views
Multithreaded implementation of K-means clustering algorithm in Java
Hello I have written a multi-threaded implementation of the K-means clustering algorithm. The main goals are correctness and scalable performance on multi-core CPUs. I expect to code to not have race ...
1
vote
1
answer
214
views
Calculation of the Distance Matrix in the K-Means Algorithm in MATLAB
Purpose of the code :
To assign the corresponding label of the centroids to the points which are close to it. Below is a graphical (2D) example.
Variable X is a matrix, rows represent the points, ...
2
votes
1
answer
279
views
A Tiny Nearest Neighbor Classification Implementation in C#
I am practicing to implement the KNN classification tool in C#. The basic point structure is constructed by the class Point, and there are two members in ...
4
votes
1
answer
304
views
K-clustering algorithm using Kruskal MST with Disjoint Set in place to check for cycles
here below a working implementation that finds the minimal distance between k(set =4 below) clusters in a graph.
I have doubts mainly on the implementation of the ...
6
votes
0
answers
129
views
K nearest neighbours algorithm
Here is a project that I worked on for a few days in June 2020. Since the algorithm is extremely slow, I looked into methods in order to parallelize operations but did not obtain any satisfactory ...
3
votes
1
answer
267
views
Implementation of K-means
I have recently built a class that is an implementation of kMeans from scratch. I believe there is room for improvement and I would happily receive some feedback. The project can be found at: https://...
6
votes
1
answer
590
views
Schelling's model of Segregation Python implementation with Geopandas
If you don't know what is Schelling's model of segregation, you can read it here.
The Schelling model of segregation is an agent-based model that illustrates how individual tendencies regarding ...
5
votes
2
answers
5k
views
Grouping sorted coordinates based on proximity to each other
I created an algotrithm that groups a sorted list of coordinates into buckets based on their proximity (30) to one another.
Steps:
Create a new key with a list ...
1
vote
1
answer
4k
views
Clustering using k-medoids
This is the program function code for clustering using k-medoids
...
2
votes
0
answers
122
views
Machine learning, kNN and Naïve Bayes algorithm
This is the task I am working on:
In this assignment you will implement the K-Nearest Neighbour and Naïve Bayes algorithms and evaluate them on a real dataset using the stratified cross validation ...
1
vote
1
answer
765
views
Welford's online variance calculation algorithm for vectors
I'm developing a face recognizing application using the face_recognition Python library.
The faces are encoded as 128-dimension floating-point vectors. In addition to this, each named known person ...
3
votes
0
answers
545
views
Locality Sensitive Hash (similar to k-Nearest Neighbor), in Python+Numpy
I've tried implementing Locality Sensitive Hash, the algorithm that helps recommendation engines, and powers apps like Shazzam that can identify songs you heard at restaurants.
LSH is supposed to run ...