PHPackages                             esplora/next-value-predictor - 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. esplora/next-value-predictor

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

esplora/next-value-predictor
============================

Predict the next value based on the previous values

1.0.0(2y ago)4255.2k↓50%MITPHPPHP ^7.3|^8.0CI passing

Since Jun 15Pushed 2y ago2 watchersCompare

[ Source](https://github.com/esplora/next-value-predictor)[ Packagist](https://packagist.org/packages/esplora/next-value-predictor)[ RSS](/packages/esplora-next-value-predictor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Next Value Predictor
====================

[](#next-value-predictor)

[![Unit tests](https://github.com/esplora/next-value-predictor/workflows/Unit%20tests/badge.svg)](https://github.com/esplora/next-value-predictor/workflows/Unit%20tests/badge.svg)

The Next Value Predictor is a PHP package that predicts the next value based on the previous values for a given data set. It considers the previous values and calculates the probability of the next value. The package is intended for use in applications that require predictive analysis capabilities.

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

[](#installation)

To use the package, run the following command in the command line:

```
$ composer require esplora/next-value-predictor
```

Usage
-----

[](#usage)

To use the package, instantiate the `Predictor` class, passing an array of previously recorded values as the parameter, and then call the `predict()` method to predict the next value.

```
use Esplora\Predictor\Predictor;

$predictor = new Predictor([1, 3, 1, 4, 2, 4, 3, 1, 4, 1, 4, 2, 1, 4, 5]);

$predictor->predict(); // 3.004
```

Weights are optional and enable you to set weighting parameters for different categories of data to help balance unbalanced sets. To use weights, pass in the desired weight as an argument for `predict()`.

```
$predictor = new Predictor([1, 3, 1, 4, 2, 4, 3, 1, 4, 1, 4, 2, 1, 4, 5]);

$predictor->predict(0.0); // 5.0
$predictor->predict(0.5); // 1.789,
```

You can also use the `probabilityGreaterThan()` method to get the probability of the next value rate being greater than a certain number.

```
$predictor->probabilityGreaterThan(5); // 0.0
$predictor->probabilityGreaterThan(0); // 1.0
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% 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

Unknown

Total

1

Last Release

1069d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c47797b11041f37c2eec74b09bc6619c8997467d690797ebad0e6ab7cb232b7?d=identicon)[tabuna](/maintainers/tabuna)

---

Top Contributors

[![tabuna](https://avatars.githubusercontent.com/u/5102591?v=4)](https://github.com/tabuna "tabuna (5 commits)")[![SadElephant](https://avatars.githubusercontent.com/u/7434276?v=4)](https://github.com/SadElephant "SadElephant (2 commits)")

---

Tags

predict

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/esplora-next-value-predictor/health.svg)

```
[![Health](https://phpackages.com/badges/esplora-next-value-predictor/health.svg)](https://phpackages.com/packages/esplora-next-value-predictor)
```

PHPackages © 2026

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