Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luffyzhao/php-kmeans
k-means for php
https://github.com/luffyzhao/php-kmeans
k-means-clustering
Last synced: about 14 hours ago
JSON representation
k-means for php
- Host: GitHub
- URL: https://github.com/luffyzhao/php-kmeans
- Owner: luffyzhao
- Created: 2017-12-07T07:25:27.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T03:11:38.000Z (almost 7 years ago)
- Last Synced: 2024-12-12T06:55:30.879Z (30 days ago)
- Topics: k-means-clustering
- Language: PHP
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### k-means聚类算法
##### K-Means算法的概述
基本K-Means算法的思想很简单,事先确定常数K,常数K意味着最终的聚类类别数,首先随机选定初始点为质心,并通过计算每一个样本与质心之间的相似度(这里为欧式距离),将样本点归到最相似的类中,接着,重新计算每个类的质心(即为类中心),重复这样的过程,知道质心不再改变,最终就确定了每个样本所属的类别以及每个类的质心。由于每次都要计算所有的样本与每一个质心之间的相似度,故在大规模的数据集上,K-Means算法的收敛速度比较慢。