PHPackages                             alcalyn/neural-network - 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. alcalyn/neural-network

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

alcalyn/neural-network
======================

Create a multilayer perceptron and make it learn life.

0221PHP

Since Apr 11Pushed 9y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Neural network
==============

[](#neural-network)

Create a multilayer perceptron and make it learn.

Usage
-----

[](#usage)

```
use Alcalyn\NeuralNetwork\Network;

# Creates a new multilayer perceptron
$network = new Network([2, 4, 1]);

# Takes an input and let it cogitate
$network->pulseInput([1, 0]); # Returns an array as output

# Takes an array of tuples input/expected output
# and adjust the network one iteration to adapt the output the expected result
$network->trainInput([[1, 0], [1]]); # Returns an array as output
```

Examples
--------

[](#examples)

- [Learning logical gate](examples/learn-logical-gate)
- [Number recognition](examples/number-recognition)

License
-------

[](#license)

This library is under [MIT License](LICENSE).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f0c4d65197a7aed6ecc8fdedd5a097c7238c9be19aca08c92c05d38fd8c29e?d=identicon)[alcalyn](/maintainers/alcalyn)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/alcalyn-neural-network/health.svg)

```
[![Health](https://phpackages.com/badges/alcalyn-neural-network/health.svg)](https://phpackages.com/packages/alcalyn-neural-network)
```

###  Alternatives

[qinchen/web-utils

A web application common utils

111.4k](/packages/qinchen-web-utils)

PHPackages © 2026

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