PHPackages                             luffyzhao/php-kmeans - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. luffyzhao/php-kmeans

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

luffyzhao/php-kmeans
====================

1.0.1(8y ago)017PHP

Since Dec 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/luffyzhao/php-kmeans)[ Packagist](https://packagist.org/packages/luffyzhao/php-kmeans)[ RSS](/packages/luffyzhao-php-kmeans/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (3)Used By (0)

### k-means聚类算法

[](#k-means聚类算法)

##### K-Means算法的概述

[](#k-means算法的概述)

基本K-Means算法的思想很简单，事先确定常数K，常数K意味着最终的聚类类别数，首先随机选定初始点为质心，并通过计算每一个样本与质心之间的相似度(这里为欧式距离)，将样本点归到最相似的类中，接着，重新计算每个类的质心(即为类中心)，重复这样的过程，知道质心不再改变，最终就确定了每个样本所属的类别以及每个类的质心。由于每次都要计算所有的样本与每一个质心之间的相似度，故在大规模的数据集上，K-Means算法的收敛速度比较慢。

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

3081d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2227a3fc2aec1575739253293ba2d1044ec99e101826a8e0bfeb120ce19843d2?d=identicon)[luffyzhao](/maintainers/luffyzhao)

---

Top Contributors

[![luffyzhao](https://avatars.githubusercontent.com/u/4166371?v=4)](https://github.com/luffyzhao "luffyzhao (2 commits)")

---

Tags

k-means-clustering

### Embed Badge

![Health badge](/badges/luffyzhao-php-kmeans/health.svg)

```
[![Health](https://phpackages.com/badges/luffyzhao-php-kmeans/health.svg)](https://phpackages.com/packages/luffyzhao-php-kmeans)
```

###  Alternatives

[velhron/dadata-bundle

DaData for Symfony

2076.6k](/packages/velhron-dadata-bundle)[phpcfdi/xml-cancelacion

Genera documentos de cancelación de CFDI firmados (XMLSEC)

1149.5k4](/packages/phpcfdi-xml-cancelacion)[pressbooks/pressbooks-aldine

Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.

114.3k](/packages/pressbooks-pressbooks-aldine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
