mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-09-21 11:49:02 +00:00
46fa2c2cca
* update ECS config to v4 * composer: require Symplify 4 * apply coding-standard: use constants over functions, protected setUp() in tests, array indentation * ecs: add false positive case * composer: update lock * bump to ECS 4.4 * update composer.lock * shorten ECS config name * ecs: ignore assignments in while() * fix cs
25 lines
406 B
PHP
25 lines
406 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Phpml\Helper;
|
|
|
|
trait Trainable
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $samples = [];
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $targets = [];
|
|
|
|
public function train(array $samples, array $targets): void
|
|
{
|
|
$this->samples = array_merge($this->samples, $samples);
|
|
$this->targets = array_merge($this->targets, $targets);
|
|
}
|
|
}
|