def __init__(
        self,
        classifier: "CLASSIFIER_TYPE",
        x_train: np.ndarray,
        y_train: np.ndarray,
        x_val: np.ndarray,
        y_val: np.ndarray,
        perf_func: str | Callable = "accuracy",
        pp_cal: float = 0.2,
        pp_quiz: float = 0.2,
        calibrated: bool = True,
        eps: float = 0.1,
    ):
        """
        Create an :class:`.RONIDefense` object with the provided classifier.

        :param classifier: Model evaluated for poison.
        :param x_train: Dataset used to train the classifier.
        :param y_train: Labels used to train the classifier.
        :param x_val: Trusted data points.
        :param y_train: Trusted data labels.
        :param perf_func: Performance function to use.
        :param pp_cal: Percent of training data used for calibration.
        :param pp_quiz: Percent of training data used for quiz set.
        :param calibrated: True if using the calibrated form of RONI.
        :param eps: performance threshold if using uncalibrated RONI.
        """
        super().__init__(classifier, x_train, y_train)
        n_points = len(x_train)
        quiz_idx = np.random.randint(n_points, size=int(pp_quiz * n_points))
        self.calibrated = calibrated
        self.x_quiz = np.copy(self.x_train[quiz_idx])
        self.y_quiz = np.copy(self.y_train[quiz_idx])
        if self.calibrated:
            _, self.x_cal, _, self.y_cal = train_test_split(self.x_train, self.y_train, test_size=pp_cal, shuffle=True)
        self.eps = eps
        self.evaluator = GroundTruthEvaluator()
        self.x_val = x_val
        self.y_val = y_val
        self.perf_func = perf_func
        self.is_clean_lst: list[int] = []
        self._check_params()

        Create an :class:`.RONIDefense` object with the provided classifier.

        :param classifier: Model evaluated for poison.
        :param x_train: Dataset used to train the classifier.
        :param y_train: Labels used to train the classifier.
        :param x_val: Trusted data points.
        :param y_train: Trusted data labels.
        :param perf_func: Performance function to use.
        :param pp_cal: Percent of training data used for calibration.
        :param pp_quiz: Percent of training data used for quiz set.
        :param calibrated: True if using the calibrated form of RONI.
        :param eps: performance threshold if using uncalibrated RONI.
        
art/defences/detector/poison/roni.py