Skip to content

Commit

Permalink
Change the default kernel type in SVC to Kernel::RBF (#267)
Browse files Browse the repository at this point in the history
* Change the default kernel type in SVC to Kernel::RBF

* Update CHANGELOG.md
  • Loading branch information
y-uti authored and akondas committed Jun 20, 2018
1 parent 46fa2c2 commit ab22cc5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/machine-learning/classification/svc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Classification/SVC.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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,
Expand Down

0 comments on commit ab22cc5

Please sign in to comment.