def predict(self, probs: np.ndarray, threshold: float = 0.5) -> np.ndarray:
        """
        Predict the target variable for each input.

        Parameters
        ----------
        probs: np.ndarray
            A one-dimensional probabilities of positive target variables for each input.
        threshold: np.ndarray
            The threshold on the predicted probabilities do decide whether a target variable is positive or
            negative.

        Returns
        -------
        np.ndarray
            The predicted target variables.
        """
        self._check_probs(probs)
        return (self.predict_proba(probs) >= threshold).astype(int)

        Predict the target variable for each input.

        Parameters
        ----------
        probs: np.ndarray
            A one-dimensional probabilities of positive target variables for each input.
        threshold: np.ndarray
            The threshold on the predicted probabilities do decide whether a target variable is positive or
            negative.

        Returns
        -------
        np.ndarray
            The predicted target variables.
        
fortuna/calibration/binary_classification/temp_scaling/base.py