Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muqsit/php-thinkit
Think-Kit is a library that offers a generic machine learning implementation.
https://github.com/muqsit/php-thinkit
artificial-intelligence library machine-learning php
Last synced: 23 days ago
JSON representation
Think-Kit is a library that offers a generic machine learning implementation.
- Host: GitHub
- URL: https://github.com/muqsit/php-thinkit
- Owner: Muqsit
- License: gpl-3.0
- Created: 2023-03-02T18:54:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-03-04T08:36:39.000Z (over 1 year ago)
- Last Synced: 2024-10-03T17:32:19.704Z (about 1 month ago)
- Topics: artificial-intelligence, library, machine-learning, php
- Language: PHP
- Homepage: https://packagist.org/packages/muqsit/php-thinkit
- Size: 29.3 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# php-thinkit
[![CI](https://github.com/Muqsit/php-thinkit/actions/workflows/ci.yml/badge.svg)](https://github.com/Muqsit/php-thinkit/actions/workflows/ci.yml)Think-Kit is a library that offers a generic machine learning implementation.
## Example Usage
The following is the equivalent of [this python code](https://gist.github.com/Muqsit/2b85711f8b8d7cad63b764c201432693):
```php
$training_input = Matrix::create([
[0, 0, 1],
[1, 1, 1],
[1, 0, 1],
[0, 0, 1]
]);
$training_output = Matrix::create([[0, 1, 1, 0]])->transpose();$model = SimpleNeuralNetworkModel::create(iterations: 10_000);
$model->train($training_input, $training_output);
$model->predict(Matrix::create([[1, 0, 0]])); // [[0.99991188]]
```