Completed
Push — develop ( 95bfc8...365a9b )
by Arkadiusz
02:42
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\SupportVectorMachine\Kernel;
8
use Phpml\SupportVectorMachine\SupportVectorMachine;
9
use Phpml\SupportVectorMachine\Type;
10
11 View Code Duplication
class SVC extends SupportVectorMachine implements Classifier
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @param int        $kernel
15
     * @param float      $cost
16
     * @param int        $degree
17
     * @param float|null $gamma
18
     * @param float      $coef0
19
     * @param float      $tolerance
20
     * @param int        $cacheSize
21
     * @param bool       $shrinking
22
     * @param bool       $probabilityEstimates
23
     */
24
    public function __construct(
25
        int $kernel = Kernel::LINEAR, float $cost = 1.0, int $degree = 3, float $gamma = null, float $coef0 = 0.0,
26
        float $tolerance = 0.001, int $cacheSize = 100, bool $shrinking = true,
27
        bool $probabilityEstimates = false
28
    ) {
29
        parent::__construct(Type::C_SVC, $kernel, $cost, 0.5, $degree, $gamma, $coef0, 0.1, $tolerance, $cacheSize, $shrinking, $probabilityEstimates);
30
    }
31
}
32