muqsit / php-thinkit
Think-Kit is a library that offers a generic machine learning implementation.
dev-master
2023-03-04 08:31 UTC
Requires
- php: ^8.0
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-11-04 12:08:56 UTC
README
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]]