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\SupportVectorMachine;
|
|
|
|
|
|
|
|
abstract class Kernel
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* u'*v.
|
|
|
|
*/
|
2017-11-14 20:21:23 +00:00
|
|
|
public const LINEAR = 0;
|
2016-05-05 21:29:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* (gamma*u'*v + coef0)^degree.
|
|
|
|
*/
|
2017-11-14 20:21:23 +00:00
|
|
|
public const POLYNOMIAL = 1;
|
2016-05-05 21:29:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* exp(-gamma*|u-v|^2).
|
|
|
|
*/
|
2017-11-14 20:21:23 +00:00
|
|
|
public const RBF = 2;
|
2016-05-05 21:29:11 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* tanh(gamma*u'*v + coef0).
|
|
|
|
*/
|
2017-11-14 20:21:23 +00:00
|
|
|
public const SIGMOID = 3;
|
2016-05-05 21:29:11 +00:00
|
|
|
}
|