1 | <?php |
||
10 | class SupportVectorMachine implements Classifier |
||
11 | { |
||
12 | use Trainable, Predictable; |
||
13 | |||
14 | /** |
||
15 | * @var float |
||
16 | */ |
||
17 | private $gamma; |
||
18 | |||
19 | /** |
||
20 | * @var float |
||
21 | */ |
||
22 | private $epsilon; |
||
23 | |||
24 | /** |
||
25 | * @var float |
||
26 | */ |
||
27 | private $tolerance; |
||
28 | |||
29 | /** |
||
30 | * @var int |
||
31 | */ |
||
32 | private $upperBound; |
||
33 | |||
34 | /** |
||
35 | * @param float $gamma |
||
36 | * @param float $epsilon |
||
37 | * @param float $tolerance |
||
38 | * @param int $upperBound |
||
39 | */ |
||
40 | public function __construct(float $gamma = .5, float $epsilon = .001, float $tolerance = .001, int $upperBound = 100) |
||
47 | |||
48 | |||
49 | /** |
||
50 | * @param array $sample |
||
51 | * |
||
52 | * @return mixed |
||
53 | */ |
||
54 | protected function predictSample(array $sample) |
||
57 | } |
||
58 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.