Skip to content

Latest commit

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

NEURAL NETWORK

This repository purpose is to provide a toy for Machine Learning around the SymfonyLive Paris 2018 and SymfonyCon Amsterdam 2019

prerequisite

Installation

composer install

Usage

php example.php
<?php// example.phprequire_once'vendor/autoload.php';
usenn\NeuralNetwork;
$nn = newNeuralNetwork(1, 3, 1);
$training_data = [
[[0], [0]],
[[1], [0]],
[[2], [0]],
[[3], [0]],
[[4], [0]],
[[5], [0]],
[[6], [1]],
[[7], [1]],
[[8], [1]],
[[9], [1]],
[[10], [1]],
];
for ($i = 0; $i < 200; ++$i) {
foreach ($training_dataas$data) {
$nn->train(...$data);
}
}
var_dump($nn->feedForward([2]));
var_dump($nn->feedForward([8]));

Have fun :)

About

No description, website, or topics provided.

Resources

Stars

9 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages