2016-05-03 21:28:29 +00:00
|
|
|
<?php
|
|
|
|
|
2016-11-20 21:53:17 +00:00
|
|
|
declare(strict_types=1);
|
2016-05-03 21:28:29 +00:00
|
|
|
|
2016-06-16 07:00:10 +00:00
|
|
|
namespace Phpml;
|
2016-05-03 21:28:29 +00:00
|
|
|
|
2016-06-15 12:09:49 +00:00
|
|
|
interface Transformer
|
2016-05-03 21:28:29 +00:00
|
|
|
{
|
2016-06-16 22:08:10 +00:00
|
|
|
/**
|
2018-02-11 21:10:12 +00:00
|
|
|
* most transformers don't require targets to train so null allow to use fit method without setting targets
|
2016-06-16 22:08:10 +00:00
|
|
|
*/
|
2018-02-11 21:10:12 +00:00
|
|
|
public function fit(array $samples, ?array $targets = null): void;
|
2016-06-16 22:08:10 +00:00
|
|
|
|
2019-05-12 20:25:17 +00:00
|
|
|
public function transform(array &$samples, ?array &$targets = null): void;
|
2016-05-03 21:28:29 +00:00
|
|
|
}
|