Coder Social home page Coder Social logo

guilhermedom / prim-kruskal-clustering Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 25 KB

Graph-based clustering method that uses Prim and Kruskal algorithms to cluster.

License: MIT License

Java 98.10% Makefile 1.90%
clustering java kruskal-algorithm minimum-spanning-tree prim-algorithm single-linkage-clustering

prim-kruskal-clustering's Introduction

Clustering with Prim-Kruskal

Java implementation of a graph-based clustering algorithm. A graph is created using the input data. Then, Prim/Kruskal algorithms are used to find and colorize clusters.

Visualizing clusters

Given the input example in file "data.txt", seven clusters can be found. By running this algorithm, we get a class for each point in the dataset. The image below is a plot of the points with colors following the classes (clusters) returned by the algorithm. Each cluster has a unique color.

The points were grouped under these clusters by creating a structure similar to a minimum spanning tree (MST). The algorithm tries to connect every point in a graph. Groups with less edges in the graph are divided into separate clusters. In the figure, it can be seen that the algorithm considers distinct groups of points having a thin connection as a single cluster. This can be a desired behavior or not, depending on what the user sees as distinct clusters.

prim-kruskal_clustering

Single-linkage clustering approach

By clustering with Prim/Kruskal, the end result is a clustering algorithm by single-linkage. Such results were already analyzed and improved in the literature. Usually, single-linkage algorithms are combined with other clustering approaches to achieve more accurate results: Gionis, A., Mannila, H., & Tsaparas, P. (2007). Clustering aggregation. Acm transactions on knowledge discovery from data (tkdd), 1(1), 4-es.

prim-kruskal-clustering's People

Contributors

guilhermedom avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.