PHPackages                             dragonzap/neuralnetwork - 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. dragonzap/neuralnetwork

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

dragonzap/neuralnetwork
=======================

Used for building neural networks in PHP

v1.1.0(1y ago)152GPL-2.0-or-laterPHP

Since May 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/dragonzapeducation/NeuralNetwork)[ Packagist](https://packagist.org/packages/dragonzap/neuralnetwork)[ RSS](/packages/dragonzap-neuralnetwork/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

NeuralNetwork
=============

[](#neuralnetwork)

This is a PHP package for building neural networks in PHP, if theirs enough interest I will adapt it into a PHP C module providing very quick training on the CPU and GPU.

### Example Usage

[](#example-usage)

```
 $total_hidden_neurons = 4;
    $total_hidden_layers = 2;
    $learning_rate = 0.1;
    $epochs = 500000;
    $total_input_neurons = 2;
    $total_output_neurons = 1;

    // You can use either "relu" or "sigmoid" for the activation function
    $network = new NeuralNetwork($total_input_neurons, $total_output_neurons, $learning_rate, $epochs, $total_hidden_neurons, $total_hidden_layers, 'relu');

    // Train the network on one page at a time, useful for large datasets
    // where you can simply load from the database.
    $network->trainNetworkBatch(4, function ($page, $total_per_page, &$input, &$output) {
        switch ($page) {
            case 0:
                $input = [
                    [0, 0],
                    [1, 0],
                    [0, 1],
                ];
                $output = [
                    [0], [1], [1]
                ];
                break;
            case 1:
                $input = [
                    [1, 1]
                ];
                $output = [
                    [0]
                ];
                break;

            default:
                echo 'out of bounds';
                exit;
                break;
        }
    }, 3);

    $network->forwardPass([1, 0], $output);
    print_r($output);

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Total

2

Last Release

712d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92cec60df55c5baae3c5b505216ad0033682404b41a6ad757f3e03d9560cd92e?d=identicon)[DragonZap](/maintainers/DragonZap)

---

Top Contributors

[![dragonzapeducation](https://avatars.githubusercontent.com/u/80857742?v=4)](https://github.com/dragonzapeducation "dragonzapeducation (7 commits)")

### Embed Badge

![Health badge](/badges/dragonzap-neuralnetwork/health.svg)

```
[![Health](https://phpackages.com/badges/dragonzap-neuralnetwork/health.svg)](https://phpackages.com/packages/dragonzap-neuralnetwork)
```

###  Alternatives

[freshbitsweb/laratables

Ajax support of DataTables for Laravel

4871.1M3](/packages/freshbitsweb-laratables)[ahand/mobileesp

Since 2008, MobileESP provides web site developers an easy-to-use and lightweight API for detecting whether visitors are using a mobile device, and if so, what kind. The APIs provide simple boolean results ('true' or 'false') for identifying individual device categories (such as iPhone, BlackBerry, Android, and Windows Mobile), device capabilities (e.g., J2ME), and broad classes of devices, such as 'iPhone Tier' (iPhone/Android/Tizen) or 'Tablet Tier.' APIs are available in PHP, JavaScript, Java, C#, Ruby Python, and more.

174491.4k7](/packages/ahand-mobileesp)

PHPackages © 2026

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