mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-04 20:47:53 +00:00
change hhvm to 3.12
This commit is contained in:
parent
f3288c5946
commit
adc2d1c81b
@ -8,7 +8,7 @@ matrix:
|
||||
php: '7.0'
|
||||
|
||||
- os: linux
|
||||
php: hhvm
|
||||
php: hhvm-3.12
|
||||
env:
|
||||
- HHVMPHP7="yes"
|
||||
|
||||
|
@ -27,13 +27,13 @@ class KNearestNeighbors implements Classifier
|
||||
* @param int $k
|
||||
* @param Distance|null $distanceMetric (if null then Euclidean distance as default)
|
||||
*/
|
||||
public function __construct(int $k = null, Distance $distanceMetric = null)
|
||||
public function __construct(int $k = 3, Distance $distanceMetric = null)
|
||||
{
|
||||
if (null === $distanceMetric) {
|
||||
$distanceMetric = new Euclidean();
|
||||
}
|
||||
|
||||
$this->k = $k ?? 3;
|
||||
$this->k = $k;
|
||||
$this->samples = [];
|
||||
$this->targets = [];
|
||||
$this->distanceMetric = $distanceMetric;
|
||||
|
Loading…
Reference in New Issue
Block a user