Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.31 KB

File metadata and controls

36 lines (28 loc) · 1.31 KB

MachineLearning

Simple stupid machine learning library for php

Build Status Scrutinizer Code Quality Code Coverage

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]));