PHPackages                             robotomize/regression-php - 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. robotomize/regression-php

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

robotomize/regression-php
=========================

Calculates regression

v0.3.3(8y ago)1634.5k↑125%3MITPHPPHP &gt;=7.0

Since Jun 14Pushed 8y ago3 watchersCompare

[ Source](https://github.com/robotomize/regression-php)[ Packagist](https://packagist.org/packages/robotomize/regression-php)[ RSS](/packages/robotomize-regression-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (13)Used By (0)

Regression-php package
----------------------

[](#regression-php-package)

[![Latest Stable Version](https://camo.githubusercontent.com/f51dc77a5cb780d143bbd62c673c1b7feaffe15ca1014ba0df5e026c8cac978d/68747470733a2f2f706f7365722e707567782e6f72672f726f626f746f6d697a652f72656772657373696f6e2d7068702f762f737461626c65)](https://packagist.org/packages/robotomize/regression-php)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e6b4b401adf3f635b0b8829a5a80c99a1098223fa3d53d62903d7dc7b38c49f7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f726f626f746f6d697a652f72656772657373696f6e2d7068702f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/robotomize/regression-php/?branch=master)[![Build Status](https://camo.githubusercontent.com/6bff4d5133eb8bbc39c043db1ad0b74797be92b95a97cce3e28848cb2e873eba/68747470733a2f2f7472617669732d63692e6f72672f726f626f746f6d697a652f72656772657373696f6e2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/robotomize/regression-php/)[![Total Downloads](https://camo.githubusercontent.com/752469ee69018b8b87b6c0602795cfd8e2c4bab22bb13e1bb68f8b6c8fbee061/68747470733a2f2f706f7365722e707567782e6f72672f726f626f746f6d697a652f72656772657373696f6e2d7068702f646f776e6c6f616473)](https://packagist.org/packages/robotomize/regression-php)[![License](https://camo.githubusercontent.com/dfd0cd04e18bd4c573991800e50e87dbf3d40e66f60459d705667d7bc8872c10/68747470733a2f2f706f7365722e707567782e6f72672f726f626f746f6d697a652f72656772657373696f6e2d7068702f6c6963656e7365)](https://packagist.org/packages/robotomize/regression-php)

Description
-----------

[](#description)

- Implementation of model building for regression
- New models of regression in the development
- There will be a separate thread for php 5.6

Requirements
------------

[](#requirements)

- composer dependency (Carbon DateTime, random-bytes)
- > = PHP 7.0

Install
-------

[](#install)

```
composer require robotomize/regression-php
```

### Linear regression algorithm

[](#linear-regression-algorithm)

Basic usage

```
$testData = [[0, 10], [1, 20], [2, 3], [3, 15], [4, 0]]
$linear = new LinearRegression();
$linear->setSourceSequence($testData);
$linear->calculate();

/** @var RegressionModel $regressionModel */
$regressionModel = $linear->getRegressionModel();
```

Factory usage

```
/** @var RegressionModel $regressionModel */
$regressionModel = Regression::Linear([[0, 10], [1, 20], [2, 3], [3, 15], [4, 0]]);
```

### Exponential regression

[](#exponential-regression)

Basic usage

```
$exponential = new ExponentialRegression();
$exponential->setSourceSequence($testData);
$exponential->calculate();
$regressionModel = $exponential->getRegressionModel();
```

Factory usage

```
$regressionModel = Regression::Exponential($testData);
```

### Logarithmic regression

[](#logarithmic-regression)

### Basic usage

[](#basic-usage)

```
$logarithmic = new LogarithmicRegression();
$logarithmic->setSourceSequence($testData);
$logarithmic->calculate();

/** @var RegressionModel $regressionModel */
$regressionModel = $logarithmic->getRegressionModel();
```

### Factory usage

[](#factory-usage)

```
$regressionModel = RegressionFactory::Logarithmic($testData);
```

### Power regression

[](#power-regression)

### Basic usage

[](#basic-usage-1)

```
$powerReg = new PowerRegression();
$powerReg->setSourceSequence($testData);
$powerReg->calculate();

/** @var RegressionModel $regressionModel */
$regressionModel = $powerReg->getRegressionModel();
```

### Factory usage

[](#factory-usage-1)

```
$regressionModel = RegressionFactory::Power($testData);
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.6% 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 ~88 days

Recently: every ~109 days

Total

6

Last Release

3183d ago

PHP version history (2 changes)v0.3.0PHP &gt;=5.6

v0.3.3PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcd7457bb06bf1c489bf88a85752575baf9716abf0edf50a42f0bffdd52aaf82?d=identicon)[robotomize](/maintainers/robotomize)

---

Top Contributors

[![robotomize](https://avatars.githubusercontent.com/u/1207984?v=4)](https://github.com/robotomize "robotomize (63 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (5 commits)")

---

Tags

exponentiallinear-regressionlogarithmic-regressionmathmath-librarypower-regressionregressionregression-algorithmsregression-phpmathregressionLinear regressionforecastexponentiallinearpowerregression-algorithmspower-regressionmath-library

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/robotomize-regression-php/health.svg)

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

###  Alternatives

[brick/math

Arbitrary-precision arithmetic library

2.1k504.0M277](/packages/brick-math)[rubix/ml

A high-level machine learning and deep learning library for the PHP language.

2.2k1.4M28](/packages/rubix-ml)[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[phpseclib/bcmath_compat

PHP 5.x-8.x polyfill for bcmath extension

16720.7M17](/packages/phpseclib-bcmath-compat)[rubix/tensor

A library and extension that provides objects for scientific computing in PHP.

2751.4M5](/packages/rubix-tensor)[jlawrence/eos

Parse and solve math equations without using 'eval()'.

1071.1M11](/packages/jlawrence-eos)

PHPackages © 2026

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