Coder Social home page Coder Social logo

kmeans's Introduction

C++ implementation of KMeans

K-Means is a very simple clustering algorithm (clustering belongs to unsupervised learning). Given a fixed number of clusters and an input dataset the algorithm tries to partition the data into clusters such that the clusters have high intra-class similarity and low inter-class similarity.

Algorithm

  1. Initialize the cluster centers, either randomly within the range of the input data or (recommended) with some of the existing training examples

  2. Until convergence
    2.1. Assign each datapoint to the closest cluster. The distance between a point and cluster center is measured using the Euclidean distance.
    2.2. Update the current estimates of the cluster centers by setting them to the mean of all instance belonging to that cluster

Disadvantages of K-Means

  • The number of clusters has to be set in the beginning
  • The results depend on the inital cluster centers
  • It's sensitive to outliers
  • It's not suitable for finding non-convex clusters
  • It's not guaranteed to find a global optimum, so it can get stuck in a local minimum

C++ implementation

C++ code

kmeans's People

Contributors

ychen216 avatar

kmeans's Issues

DEFUSE

你好,最近看到了你发的文章Asymptotically Unbiased Estimation for Delayed Feedback Modeling via Label Correction, 感觉挺好的,我也在做一些延迟建模方面的工作。想在DEFUSE项目下留言,但是那个项目没开issue,所以在这个项目下留言了。问下我们可不可以交流下延迟建模方面的想法哈?

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.