PHPackages                             algenza/cosine-similarity - 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. algenza/cosine-similarity

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

algenza/cosine-similarity
=========================

Cosine similarity

v0.1.3(9y ago)225.8k↓26.9%MITPHP

Since Sep 22Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (5)Used By (0)

Cosine-Similarity
=================

[](#cosine-similarity)

[![Build Status](https://camo.githubusercontent.com/c3d33bd981692912fb3232707cedde9d3cd834ae5b606613a4b2542d613f2304/68747470733a2f2f7472617669732d63692e6f72672f616c67656e7a612f636f73696e652d73696d696c61726974792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/algenza/cosine-similarity)

Installation
------------

[](#installation)

```
composer require algenza/cosine-similarity
```

How to use?
-----------

[](#how-to-use)

```
use Algenza\Cosinesimilarity\Cosine;

$vectorA = [
'type' => 3,
'code' => 5,
'run' => 2
];

$vectorB = [
'type' => 3,
'code' => 5,
'run' => 2
];

$similarity = Cosine::similarity($vectorA, $vectorB);
```

Lisence
-------

[](#lisence)

MIT

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~0 days

Total

4

Last Release

3573d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5905964?v=4)[Billy Renyut](/maintainers/algenza)[@algenza](https://github.com/algenza)

---

Top Contributors

[![engineer-create](https://avatars.githubusercontent.com/u/282422669?v=4)](https://github.com/engineer-create "engineer-create (6 commits)")

---

Tags

cosine-similarity

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/algenza-cosine-similarity/health.svg)

```
[![Health](https://phpackages.com/badges/algenza-cosine-similarity/health.svg)](https://phpackages.com/packages/algenza-cosine-similarity)
```

###  Alternatives

[visualappeal/php-auto-update

Autoupdater for PHP

24436.4k](/packages/visualappeal-php-auto-update)[openeuropa/oe_theme

OpenEuropa base theme.

37170.6k5](/packages/openeuropa-oe-theme)[zerkalica/millwright-menu-bundle

Config abstraction for knp menu bundle

234.1k4](/packages/zerkalica-millwright-menu-bundle)

PHPackages © 2026

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