Simple stupid machine learning library for php
This library is not designed for production or high performance requirements, it's more a proof of concept and framework to play with Machine Learning Algorithms.
- Gradient Descent Algorithm
- Mean Scale Normalization
- Linear Hypothesis for multiple unlimited variables
Include with composer
composer require zeopix/machine-learning
use Zeopix\MachineLearning\Application\Service\LinearRegressionService
use Zeopix\MachineLearning\Domain\Model\Value\VectorValue;
$linearRegressionService = new LinearRegressionService();
$data = [
[[2,3], 1],
[[4,6], 2]
];
$training = $linearRegressionService->train($data);
$prediction = $training->predict(new VectorValue([8,12]));