muqsit/php-thinkit

Think-Kit is a library that offers a generic machine learning implementation.

dev-master 2023-03-04 08:31 UTC

This package is auto-updated.

Last update: 2024-05-04 11:07:54 UTC


README

CI

Think-Kit is a library that offers a generic machine learning implementation.

Example Usage

The following is the equivalent of this python code:

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