All Projects → yusufuzun → dbscan

yusufuzun / dbscan

Licence: other
DBSCAN Clustering Algorithm C# Implementation

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to dbscan

Danmf
A sparsity aware implementation of "Deep Autoencoder-like Nonnegative Matrix Factorization for Community Detection" (CIKM 2018).
Stars: ✭ 161 (+323.68%)
Mutual labels:  clustering, unsupervised-learning
DBSCAN
c++ implementation of clustering by DBSCAN
Stars: ✭ 89 (+134.21%)
Mutual labels:  clustering, dbscan
Keras deep clustering
How to do Unsupervised Clustering with Keras
Stars: ✭ 202 (+431.58%)
Mutual labels:  clustering, unsupervised-learning
point-cloud-clusters
A catkin workspace in ROS which uses DBSCAN to identify which points in a point cloud belong to the same object.
Stars: ✭ 43 (+13.16%)
Mutual labels:  clustering, dbscan
LabelPropagation
A NetworkX implementation of Label Propagation from a "Near Linear Time Algorithm to Detect Community Structures in Large-Scale Networks" (Physical Review E 2008).
Stars: ✭ 101 (+165.79%)
Mutual labels:  clustering, unsupervised-learning
Text Summarizer
Python Framework for Extractive Text Summarization
Stars: ✭ 96 (+152.63%)
Mutual labels:  clustering, unsupervised-learning
Spectralcluster
Python re-implementation of the spectral clustering algorithm in the paper "Speaker Diarization with LSTM"
Stars: ✭ 220 (+478.95%)
Mutual labels:  clustering, unsupervised-learning
Unsupervised Classification
SCAN: Learning to Classify Images without Labels (ECCV 2020), incl. SimCLR.
Stars: ✭ 605 (+1492.11%)
Mutual labels:  clustering, unsupervised-learning
gouda
Golang Utilities for Data Analysis
Stars: ✭ 18 (-52.63%)
Mutual labels:  clustering, dbscan
Revisiting-Contrastive-SSL
Revisiting Contrastive Methods for Unsupervised Learning of Visual Representations. [NeurIPS 2021]
Stars: ✭ 81 (+113.16%)
Mutual labels:  clustering, unsupervised-learning
Self Supervised Learning Overview
📜 Self-Supervised Learning from Images: Up-to-date reading list.
Stars: ✭ 73 (+92.11%)
Mutual labels:  clustering, unsupervised-learning
acoustic-keylogger
Pipeline of a keylogging attack using just an audio signal and unsupervised learning.
Stars: ✭ 80 (+110.53%)
Mutual labels:  clustering, unsupervised-learning
Bagofconcepts
Python implementation of bag-of-concepts
Stars: ✭ 18 (-52.63%)
Mutual labels:  clustering, unsupervised-learning
Awesome Community Detection
A curated list of community detection research papers with implementations.
Stars: ✭ 1,874 (+4831.58%)
Mutual labels:  clustering, unsupervised-learning
Minisom
🔴 MiniSom is a minimalistic implementation of the Self Organizing Maps
Stars: ✭ 801 (+2007.89%)
Mutual labels:  clustering, unsupervised-learning
Gemsec
The TensorFlow reference implementation of 'GEMSEC: Graph Embedding with Self Clustering' (ASONAM 2019).
Stars: ✭ 210 (+452.63%)
Mutual labels:  clustering, unsupervised-learning
dti-clustering
(NeurIPS 2020 oral) Code for "Deep Transformation-Invariant Clustering" paper
Stars: ✭ 60 (+57.89%)
Mutual labels:  clustering, unsupervised-learning
L2c
Learning to Cluster. A deep clustering strategy.
Stars: ✭ 262 (+589.47%)
Mutual labels:  clustering, unsupervised-learning
text clustering
文本聚类(Kmeans、DBSCAN、LDA、Single-pass)
Stars: ✭ 230 (+505.26%)
Mutual labels:  clustering, dbscan
M-NMF
An implementation of "Community Preserving Network Embedding" (AAAI 2017)
Stars: ✭ 119 (+213.16%)
Mutual labels:  clustering, unsupervised-learning

DBSCAN

DBSCAN Clustering Algorithm C# Implementation

It is a small project that implements DBSCAN Clustering algorithm in C# and dotnet-core.

For using this you only need to define your own dataset class and create DbscanAlgorithm class to perform clustering. After that only call the ComputeClusterDbscan with desired clustering parameter.

You can check previous git tags for more primitive DBSCAN implementation.

Example:

Your dataset items (preference, feature, vector, row, etc.):

public class MyCustomFeature
{
    public double X;
    public double Y;

    public MyCustomFeature(double x, double y)
    {
        X = x;
        Y = y;
    }
}

Your Distance Function

private static double EuclidienDistance(MyFeature feature1, MyFeature feature2)
{
    return Math.Sqrt(
            ((feature1.X - feature2.X) * (feature1.X - feature2.X)) +
            ((feature1.Y - feature2.Y) * (feature1.Y - feature2.Y))
        );
}

Then for clustering with simple form

var features = new MyFeatureDataSource().GetFeatureData();

//INFO: applied euclidean distance as metric calculation function
var simpleDbscan = new DbscanAlgorithm<MyFeature>(EuclidienDistance);

//returns DbscanResult typed object of algorithm's process
var result = dbscan.ComputeClusterDbscan(allPoints: features.ToArray(), epsilon: .01, minimumPoints: 10);

If you want to get events happening inside algorithm then you can create algorithm with other constructor which takes a publisher type as instance

//INFO: second argument of constructor takes an instance implemented with IDbscanEventPublisher interface
var dbscanWithEventing = new DbscanAlgorithm<MyFeature>(
        EuclidienDistance,
        new MyFeatureConsoleLogger()
    );

var resultWithEventing = dbscanWithEventing.ComputeClusterDbscan(allPoints: features.ToArray(), epsilon: .01, minimumPoints: 10);

An example of the implementation for IDbscanEventPublisher interface:

public class DbscanLogger : IDbscanEventPublisher
{
    public void Publish(params object[] events)
    {
        foreach (var e in events)
        {
            //INFO: match the events you want to process
            var info = e switch
            {
                PointTypeAssigned<MyCustomFeature> pta => $"{pta.Point.ClusterId}: {pta.AssignedType}",
                _ => null
            };

            if (info != null)
            {
                Console.WriteLine(info);
            }
        }
    }
}

Another example of IDbscanEventPublisher could be a Pub/Sub application, like this:

var exchange = new QueueExchange<object>();

var publisher = new QueueExchangePublisher(exchange);

var dbscanAsync = new DbscanAlgorithm<MyFeature>(
    EuclidienDistance,
    publisher
);

var subscriber = new QueueExchangeSubscriber<object, MyFeature>(exchange);

var subscriptionTask = subscriber.Subscribe();

This can be anything that succeeds the Pub/Sub design. You can asyncronously build your own analytics result by subscription.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].