Skip to content
/ KMeans Public

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

License

Notifications You must be signed in to change notification settings

mt-cly/KMeans

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages