percentNotInRange() public static method

public static percentNotInRange ( $name ) : InvalidArgumentException
$name
return InvalidArgumentException
Example #1
0
 /**
  * @param Dataset $dataset
  * @param float   $testSize
  * @param int     $seed
  *
  * @throws InvalidArgumentException
  */
 public function __construct(Dataset $dataset, float $testSize = 0.3, int $seed = null)
 {
     if (0 >= $testSize || 1 <= $testSize) {
         throw InvalidArgumentException::percentNotInRange('testSize');
     }
     $this->seedGenerator($seed);
     $this->splitDataset($dataset, $testSize);
 }