Git Product home page Git Product logo

kmeans's Introduction

KMeans

  It's just the course work of Parttern Recognition, made with python.

  First, you should pack your data of points up to a numpy.array, and save it as a .npy.——just like the file 'sample_pnts.npy'.
  Then, run the K-means.py. The params of K-means.py should include the path of .npy file at least. And the second param 'CLASS_NUM' is not required.
  You can get the message like 'class_center_points location', 'loss value', 'divide result' if you have setted CLASS_NUM with '-c'.
  if CLASS_NUM don't be setted, the project would calculate the results in different situation of CLASS_NUM=1, CLASS_NUM=2, CLASS_NUM=3,....Finally, draw those result in the matplot. So you can get a image shows the varity of loss and CLASS_NUM.

Command sample:
  python K-means.py sample_pnts.npy -c 3
  python K-means.py sample_pnts.npy

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.