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
|
|
|
* @param int $kernel
|
|
|
|
* @param float $cost
|
|
|
|
* @param int $degree
|
|
|
|
* @param float|null $gamma
|
|
|
|
* @param float $coef0
|
|
|
|
* @param float $tolerance
|
|
|
|
* @param int $cacheSize
|
|
|
|
* @param bool $shrinking
|
|
|
|
* @param bool $probabilityEstimates
|
2016-05-05 21:29:11 +00:00
|
|
|
*/
|
2016-05-07 20:17:12 +00:00
|
|
|
public function __construct(
|
2016-05-07 21:04:58 +00:00
|
|
|
int $kernel = Kernel::LINEAR, float $cost = 1.0, int $degree = 3, float $gamma = null, float $coef0 = 0.0,
|
2016-05-07 20:17:12 +00:00
|
|
|
float $tolerance = 0.001, int $cacheSize = 100, bool $shrinking = true,
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|