estimator = $estimator; $this->metric = $metric; } /** * Perform a check of the specification and throw an exception if invalid. * * @throws \Rubix\ML\Exceptions\InvalidArgumentException */ public function check() : void { if (!in_array($this->estimator->type(), $this->metric->compatibility())) { throw new EstimatorIncompatibleWithMetric($this->estimator, $this->metric); } } }