Code Duplication    Length = 21-21 lines in 2 locations

src/Phpml/Classification/SVC.php 1 location

@@ 11-31 (lines=21) @@
8
use Phpml\SupportVectorMachine\SupportVectorMachine;
9
use Phpml\SupportVectorMachine\Type;
10
11
class SVC extends SupportVectorMachine implements Classifier
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

src/Phpml/Regression/SVR.php 1 location

@@ 11-31 (lines=21) @@
8
use Phpml\SupportVectorMachine\SupportVectorMachine;
9
use Phpml\SupportVectorMachine\Type;
10
11
class SVR extends SupportVectorMachine implements Regression
12
{
13
    /**
14
     * @param int        $kernel
15
     * @param int        $degree
16
     * @param float      $epsilon
17
     * @param float      $cost
18
     * @param float|null $gamma
19
     * @param float      $coef0
20
     * @param float      $tolerance
21
     * @param int        $cacheSize
22
     * @param bool       $shrinking
23
     */
24
    public function __construct(
25
        int $kernel = Kernel::RBF, int $degree = 3, float $epsilon = 0.1, float $cost = 1.0,
26
        float $gamma = null, float $coef0 = 0.0,  float $tolerance = 0.001,
27
        int $cacheSize = 100, bool $shrinking = true
28
    ) {
29
        parent::__construct(Type::EPSILON_SVR, $kernel, $cost, 0.5, $degree, $gamma, $coef0, $epsilon, $tolerance, $cacheSize, $shrinking, false);
30
    }
31
}
32