mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-09-27 14:39:02 +00:00
38 lines
575 B
PHP
38 lines
575 B
PHP
<?php
|
|
|
|
declare (strict_types = 1);
|
|
|
|
namespace Phpml\Regression;
|
|
|
|
class LeastSquares implements Regression
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $features;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $targets;
|
|
|
|
/**
|
|
* @param array $features
|
|
* @param array $targets
|
|
*/
|
|
public function train(array $features, array $targets)
|
|
{
|
|
$this->features = $features;
|
|
$this->targets = $targets;
|
|
}
|
|
|
|
/**
|
|
* @param array $features
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function predict(array $features)
|
|
{
|
|
}
|
|
}
|