def __init__(
        self,
        classifier: "CLASSIFIER_TYPE",
        x_train: np.ndarray,
        y_train: np.ndarray,
        p_train: np.ndarray,
        x_val: np.ndarray | None = None,
        y_val: np.ndarray | None = None,
        eps: float = 0.2,
        perf_func: str = "accuracy",
        pp_valid: float = 0.2,
    ) -> None:
        """
        Create an :class:`.ProvenanceDefense` 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 p_train: provenance features for each training data point as one hot vectors.
        :param x_val: Validation data for defense.
        :param y_val: Validation labels for defense.
        :param eps: Threshold for performance shift in suspicious data.
        :param perf_func: performance function used to evaluate effectiveness of defense.
        :param pp_valid: The percent of training data to use as validation data (for defense without validation data).
        """
        super().__init__(classifier, x_train, y_train)
        self.p_train = p_train
        self.num_devices = self.p_train.shape[1]
        self.x_val = x_val
        self.y_val = y_val
        self.eps = eps
        self.perf_func = perf_func
        self.pp_valid = pp_valid
        self.assigned_clean_by_device: list[np.ndarray] = []
        self.is_clean_by_device: list[np.ndarray] = []
        self.errors_by_device: np.ndarray | None = None
        self.evaluator = GroundTruthEvaluator()
        self.is_clean_lst: np.ndarray | None = None
        self._check_params()

        Create an :class:`.ProvenanceDefense` 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 p_train: provenance features for each training data point as one hot vectors.
        :param x_val: Validation data for defense.
        :param y_val: Validation labels for defense.
        :param eps: Threshold for performance shift in suspicious data.
        :param perf_func: performance function used to evaluate effectiveness of defense.
        :param pp_valid: The percent of training data to use as validation data (for defense without validation data).
        
art/defences/detector/poison/provenance_defense.py