class_docstr: Implementation of a an attribute inference attack that utilizes a membership inference attack.
  
  The idea is to find the target feature value that causes the membership inference attack to classify the sample
  as a member with the highest confidence.
docstr: Create an AttributeInferenceMembership attack instance.
  
  :param estimator: Target estimator.
  :param membership_attack: The membership inference attack to use. Should be fit/calibrated in advance, and
                            should support returning probabilities. Should also support the target estimator.
  :param attack_feature: The index of the feature to be attacked or a slice representing multiple indexes in
                         case of a one-hot encoded feature.
docstr_tok: ["Create","an","AttributeInferenceMembership","attack","instance",".",":","param","estimator",":","Target","estimator",".",":","param","membership_attack",":","The","membership","inference","attack","to","use",".","Should","be","fit\/calibrated","in","advance",",","and","should","support","returning","probabilities",".","Should","also","support","the","target","estimator",".",":","param","attack_feature",":","The","index","of","the","feature","to","be","attacked","or","a","slice","representing","multiple","indexes","in","case","of","a","one-hot","encoded","feature","."]
code: def __init__(
      self,
      estimator: Union["CLASSIFIER_TYPE", "REGRESSOR_TYPE"],
      membership_attack: MembershipInferenceAttack,
      attack_feature: Union[int, slice] = 0,
  ):
      """
      Create an AttributeInferenceMembership attack instance.
  
      :param estimator: Target estimator.
      :param membership_attack: The membership inference attack to use. Should be fit/calibrated in advance, and
                                should support returning probabilities. Should also support the target estimator.
      :param attack_feature: The index of the feature to be attacked or a slice representing multiple indexes in
                             case of a one-hot encoded feature.
      """
      super().__init__(
          estimator=estimator, attack_feature=attack_feature
      )
      if not membership_attack.is_estimator_valid(
          estimator, estimator_requirements=self.estimator_requirements
      ):
          raise EstimatorError(
              membership_attack.__class__,
              membership_attack.estimator_requirements,
              estimator,
          )
  
      self.membership_attack = membership_attack
      self._check_params()
  
file_path: adversarial-robustness-toolbox/art/attacks/inference/attribute_inference/meminf_based.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  from typing import Optional, Union, List, TYPE_CHECKING
  import numpy
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassifierMixin
  from art.attacks.attack import AttributeInferenceAttack, MembershipInferenceAttack
  from art.estimators.regression import RegressorMixin
  from art.exceptions import EstimatorError
label_desc: Use image node_id 1 to create a new AttributeInferenceMembership object from inherited base classes: AttributeInferenceAttack with example: obj = AttributeInferenceMembership(estimator, membership_attack, attack_feature)