Completed
Push — develop ( a2e8a8...95caef )
by Arkadiusz
02:53
created

SVC::predictSample()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
declare (strict_types = 1);
4
5
namespace Phpml\Classification;
6
7
use Phpml\Classification\Traits\Predictable;
8
use Phpml\Classification\Traits\Trainable;
9
use Phpml\Math\Kernel;
10
11
class SVC implements Classifier
12
{
13
    use Trainable, Predictable;
14
15
    /**
16
     * @var int
17
     */
18
    private $kernel;
19
20
    /**
21
     * @var float
22
     */
23
    private $cost;
24
25
    /**
26
     * @param int   $kernel
27
     * @param float $cost
28
     */
29
    public function __construct(int $kernel, float $cost)
30
    {
31
        $this->kernel = $kernel;
32
        $this->cost = $cost;
33
    }
34
35
    /**
36
     * @param array $samples
37
     * @param array $labels
38
     */
39
    public function train(array $samples, array $labels)
40
    {
41
        $this->samples = $samples;
42
        $this->labels = $labels;
43
    }
44
45
    /**
46
     * @param array $sample
47
     *
48
     * @return mixed
49
     */
50
    protected function predictSample(array $sample)
0 ignored issues
show
Unused Code introduced by
The parameter $sample is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
51
    {
52
    }
53
}
54