theta = $theta; } /** * @param float|int $value */ public function compute($value): float { return $value > $this->theta ? $value : 0.0; } /** * @param float|int $value * @param float|int $calculatedvalue */ public function differentiate($value, $calculatedvalue): float { return $calculatedvalue >= $this->theta ? 1.0 : 0.0; } }