zeopix/machine-learning

Simple Machine Learning POO Implementation

dev-master / 1.x-dev 2016-04-13 16:52 UTC

This package is not auto-updated.

Last update: 2024-05-17 17:23:39 UTC


README

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