Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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]]
```