def get_classifier(self, thresholds: list[float]) -> BlackBoxClassifier:
        """
        Returns a classifier representation of the regressor. Maps real values to classes based on the provided
        thresholds.

        :param thresholds: The cutoff values for mapping real values to classes.
        :return: BlackBoxClassifier instance
        """

        def predict_class(x):
            predictions = self.predict(x)
            binned = np.digitize(predictions, thresholds)
            return np.eye(len(thresholds) + 1)[binned]

        classifier = BlackBoxClassifier(
            predict_class,
            self.input_shape,
            len(thresholds) + 1,
            clip_values=self.clip_values,
            preprocessing_defences=self.preprocessing_defences,
            postprocessing_defences=self.postprocessing_defences,
            preprocessing=self.preprocessing,
            fuzzy_float_compare=self._fuzzy_float_compare,
        )
        return classifier

        Returns a classifier representation of the regressor. Maps real values to classes based on the provided
        thresholds.

        :param thresholds: The cutoff values for mapping real values to classes.
        :return: BlackBoxClassifier instance
        
art/estimators/regression/blackbox.py