class_docstr: Implements methods performing poisoning detection based on data provenance.
  
  | Paper link: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8473440
class_docstr_tok: ["Implements","methods","performing","poisoning","detection","based","on","data","provenance",".","|","Paper","link",":","https",":","\/\/ieeexplore.ieee.org\/stamp\/stamp.jsp","?","tp=","&","arnumber=8473440"]
docstr: Return the data and labels that are not part of a specified segment
  
  :param data: The data to segment.
  :param labels: The corresponding labels to segment
  :param segment:
  :return: Tuple of (filtered_data, filtered_labels).
docstr_tok: ["Return","the","data","and","labels","that","are","not","part","of","a","specified","segment",":","param","data",":","The","data","to","segment",".",":","param","labels",":","The","corresponding","labels","to","segment",":","param","segment",":",":","return",":","Tuple","of","(","filtered_data",",","filtered_labels",")","."]
code: def filter_input(
      data: np.ndarray, labels: np.ndarray, segment: np.ndarray
  ) -> Tuple[np.ndarray, np.ndarray]:
      """
      Return the data and labels that are not part of a specified segment
  
      :param data: The data to segment.
      :param labels: The corresponding labels to segment
      :param segment:
      :return: Tuple of (filtered_data, filtered_labels).
      """
      filter_mask = np.array(
          [
              np.isin(data[i, :], segment, invert=True).any()
              for i in range(data.shape[0])
          ]
      )
      filtered_data = data[filter_mask]
      filtered_labels = labels[filter_mask]
  
      return filtered_data, filtered_labels
  
file_path: adversarial-robustness-toolbox/art/defences/detector/poison/provenance_defense.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from copy import deepcopy
  from typing import Dict, List, Optional, Tuple, TYPE_CHECKING
  import numpy
  from sklearn.model_selection import train_test_split
  from art.defences.detector.poison.ground_truth_evaluator import GroundTruthEvaluator
  from art.defences.detector.poison.poison_filtering_defence import PoisonFilteringDefence
  from art.utils import segment_by_class, performance_diff
label_desc: Use image node_id 6 for calling the ProvenanceDefense obj's underlying member method code with example usage: obj.filter_input(data, labels, segment) and returns: filtered_data,  filtered_labels