1 | <?php |
||
7 | class SupportVectorMachine |
||
8 | { |
||
9 | /** |
||
10 | * @var int |
||
11 | */ |
||
12 | private $type; |
||
13 | |||
14 | /** |
||
15 | * @var int |
||
16 | */ |
||
17 | private $kernel; |
||
18 | |||
19 | /** |
||
20 | * @var float |
||
21 | */ |
||
22 | private $cost; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $binPath; |
||
28 | |||
29 | /** |
||
30 | * @var |
||
31 | */ |
||
32 | private $varPath; |
||
33 | |||
34 | /** |
||
35 | * @var string |
||
36 | */ |
||
37 | private $model; |
||
38 | |||
39 | /** |
||
40 | * @param int $type |
||
41 | * @param int $kernel |
||
42 | * @param float $cost |
||
43 | */ |
||
44 | public function __construct(int $type, int $kernel, float $cost) |
||
55 | |||
56 | /** |
||
57 | * @param array $samples |
||
58 | * @param array $labels |
||
59 | */ |
||
60 | public function train(array $samples, array $labels) |
||
75 | |||
76 | /** |
||
77 | * @return string |
||
78 | */ |
||
79 | public function getModel() |
||
83 | } |
||
84 |