Change the default kernel type in SVC to Kernel::RBF (#267)

* Change the default kernel type in SVC to Kernel::RBF

* Update CHANGELOG.md
This commit is contained in:
Yuji Uchiyama 2018-06-21 06:28:11 +09:00 committed by Arkadiusz Kondas
parent 46fa2c2cca
commit ab22cc5b68
3 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ CHANGELOG
This changelog references the relevant changes done in PHP-ML library.
* Unreleased
* feature [Dataset] changed the default kernel type in SVC to Kernel::RBF (#267)
* feature [Clustering] added KMeans associative clustering (#262)
* feature [Dataset] added removeColumns function to ArrayDataset (#249)
* feature [Dataset] added a SvmDataset class for SVM-Light (or LibSVM) format files (#237)

View File

@ -4,7 +4,7 @@ Classifier implementing Support Vector Machine based on libsvm.
### Constructor Parameters
* $kernel (int) - kernel type to be used in the algorithm (default Kernel::LINEAR)
* $kernel (int) - kernel type to be used in the algorithm (default Kernel::RBF)
* $cost (float) - parameter C of C-SVC (default 1.0)
* $degree (int) - degree of the Kernel::POLYNOMIAL function (default 3)
* $gamma (float) - kernel coefficient for Kernel::RBF, Kernel::POLYNOMIAL and Kernel::SIGMOID. If gamma is null then 1/features will be used instead.

View File

@ -11,7 +11,7 @@ use Phpml\SupportVectorMachine\Type;
class SVC extends SupportVectorMachine implements Classifier
{
public function __construct(
int $kernel = Kernel::LINEAR,
int $kernel = Kernel::RBF,
float $cost = 1.0,
int $degree = 3,
?float $gamma = null,