zeopix / machine-learning
Simple Machine Learning POO Implementation
dev-master / 1.x-dev
2016-04-13 16:52 UTC
Requires
- php: >=5.5.9
Requires (Dev)
- phpunit/phpunit: ~4
This package is not auto-updated.
Last update: 2025-01-24 20:35:48 UTC
README
Simple stupid machine learning library for php
Warning
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.
Features
- Gradient Descent Algorithm
- Mean Scale Normalization
- Linear Hypothesis for multiple unlimited variables
Usage
Include with composer
composer require zeopix/machine-learning
Train your dataset
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]));