Clustering

Leon Pierre edited this page Apr 13, 2018 · 4 revisions

Clustering problems

Unsupervised classification

Knowledge discovery

Models

K-Means

using Accord.MachineLearning;

Accord.Math.Random.Generator.Seed = 0;

// Declare some observations
double[][] observations =
{
    new double[] { -5, -2, -1 },
    new double[] { -5, -5, -6 },
    new double[] {  2,  1,  1 },
    new double[] {  1,  1,  2 },
    new double[] {  1,  2,  2 },
    new double[] {  3,  1,  2 },
    new double[] { 11,  5,  4 },
    new double[] { 15,  5,  6 },
    new double[] { 10,  5,  6 },
};

// Create a new K-Means algorithm with 3 clusters 
KMeans kmeans = new KMeans(3);

// Compute the algorithm, retrieving an integer array
//  containing the labels for each of the observations
KMeansClusterCollection clusters = kmeans.Learn(observations);

// As a result, the first two observations should belong to the
//  same cluster (thus having the same label). The same should
//  happen to the next four observations and to the last three.
int[] labels = clusters.Decide(observations);

Binary Split

Mean Shift

Gaussian Mixture Models

  1. Accord.NET Framework
  2. Getting started
  3. Published books
  4. How to use
  5. Sample applications

Help improve this wiki! Those pages can be edited by anyone that would like to contribute examples and documentation to the framework.

Have you found this software useful? Consider donating only U$10 so it can get even better! This software is completely free and will always stay free. Enjoy!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.