2016-05-05 21:29:11 +00:00
|
|
|
<?php
|
|
|
|
|
2016-11-20 21:53:17 +00:00
|
|
|
declare(strict_types=1);
|
2016-05-05 21:29:11 +00:00
|
|
|
|
|
|
|
namespace Phpml\Classification;
|
|
|
|
|
2016-05-07 21:04:58 +00:00
|
|
|
use Phpml\SupportVectorMachine\Kernel;
|
2016-05-07 20:17:12 +00:00
|
|
|
use Phpml\SupportVectorMachine\SupportVectorMachine;
|
|
|
|
use Phpml\SupportVectorMachine\Type;
|
2016-05-05 21:29:11 +00:00
|
|
|
|
2016-05-07 20:17:12 +00:00
|
|
|
class SVC extends SupportVectorMachine implements Classifier
|
2016-05-05 21:29:11 +00:00
|
|
|
{
|
2016-05-07 20:17:12 +00:00
|
|
|
public function __construct(
|
2017-07-26 06:24:47 +00:00
|
|
|
int $kernel = Kernel::LINEAR,
|
|
|
|
float $cost = 1.0,
|
|
|
|
int $degree = 3,
|
2017-11-14 20:21:23 +00:00
|
|
|
?float $gamma = null,
|
2017-07-26 06:24:47 +00:00
|
|
|
float $coef0 = 0.0,
|
|
|
|
float $tolerance = 0.001,
|
|
|
|
int $cacheSize = 100,
|
|
|
|
bool $shrinking = true,
|
2016-05-07 20:17:12 +00:00
|
|
|
bool $probabilityEstimates = false
|
|
|
|
) {
|
|
|
|
parent::__construct(Type::C_SVC, $kernel, $cost, 0.5, $degree, $gamma, $coef0, 0.1, $tolerance, $cacheSize, $shrinking, $probabilityEstimates);
|
2016-05-05 21:29:11 +00:00
|
|
|
}
|
|
|
|
}
|