mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-09-27 22:49:04 +00:00
22 lines
369 B
PHP
22 lines
369 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Phpml\Classification;
|
|
|
|
abstract class WeightedClassifier implements Classifier
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $weights = [];
|
|
|
|
/**
|
|
* Sets the array including a weight for each sample
|
|
*/
|
|
public function setSampleWeights(array $weights): void
|
|
{
|
|
$this->weights = $weights;
|
|
}
|
|
}
|