def __init__(self, classifier, confidence=0.0, targeted=True, learning_rate=0.01, binary_search_steps=9, max_iter=10000, beta=0.001, initial_const=0.001, batch_size=128, decision_rule='EN'):
    "\n        Create an ElasticNet attack instance.\n\n        :param classifier: A trained model.\n        :type classifier: :class:`.Classifier`\n        :param confidence: Confidence of adversarial examples: a higher value produces examples that are farther\n               away, from the original input, but classified with higher confidence as the target class.\n        :type confidence: `float`\n        :param targeted: Should the attack target one specific class.\n        :type targeted: `bool`\n        :param learning_rate: The initial learning rate for the attack algorithm. Smaller values produce better\n               results but are slower to converge.\n        :type learning_rate: `float`\n        :param binary_search_steps: Number of times to adjust constant with binary search (positive value).\n        :type binary_search_steps: `int`\n        :param max_iter: The maximum number of iterations.\n        :type max_iter: `int`\n        :param beta: Hyperparameter trading off L2 minimization for L1 minimization.\n        :type beta: `float`\n        :param initial_const: The initial trade-off constant `c` to use to tune the relative importance of distance\n               and confidence. If `binary_search_steps` is large, the initial constant is not important, as discussed in\n               Carlini and Wagner (2016).\n        :type initial_const: `float`\n        :param batch_size: Internal size of batches on which adversarial samples are generated.\n        :type batch_size: `int`\n        :param decision_rule: Decision rule. 'EN' means Elastic Net rule, 'L1' means L1 rule, 'L2' means L2 rule.\n        :type decision_rule: `string`\n        "
    super(ElasticNet, self).__init__(classifier)
    kwargs = {'confidence': confidence, 'targeted': targeted, 'learning_rate': learning_rate, 'binary_search_steps': binary_search_steps, 'max_iter': max_iter, 'beta': beta, 'initial_const': initial_const, 'batch_size': batch_size, 'decision_rule': decision_rule}
    assert self.set_params(**kwargs)
Create an ElasticNet attack instance.

:param classifier: A trained model.
:type classifier: :class:`.Classifier`
:param confidence: Confidence of adversarial examples: a higher value produces examples that are farther
       away, from the original input, but classified with higher confidence as the target class.
:type confidence: `float`
:param targeted: Should the attack target one specific class.
:type targeted: `bool`
:param learning_rate: The initial learning rate for the attack algorithm. Smaller values produce better
       results but are slower to converge.
:type learning_rate: `float`
:param binary_search_steps: Number of times to adjust constant with binary search (positive value).
:type binary_search_steps: `int`
:param max_iter: The maximum number of iterations.
:type max_iter: `int`
:param beta: Hyperparameter trading off L2 minimization for L1 minimization.
:type beta: `float`
:param initial_const: The initial trade-off constant `c` to use to tune the relative importance of distance
       and confidence. If `binary_search_steps` is large, the initial constant is not important, as discussed in
       Carlini and Wagner (2016).
:type initial_const: `float`
:param batch_size: Internal size of batches on which adversarial samples are generated.
:type batch_size: `int`
:param decision_rule: Decision rule. 'EN' means Elastic Net rule, 'L1' means L1 rule, 'L2' means L2 rule.
:type decision_rule: `string`
def __init__(self, classifier, confidence=0.0, targeted=True, learning_rate=0.01, binary_search_steps=9, max_iter=10000, beta=0.001, initial_const=0.001, batch_size=128, decision_rule='EN'):
    "\n        Create an ElasticNet attack instance.\n\n        :param classifier: A trained model.\n        :type classifier: :class:`.Classifier`\n        :param confidence: Confidence of adversarial examples: a higher value produces examples that are farther\n               away, from the original input, but classified with higher confidence as the target class.\n        :type confidence: `float`\n        :param targeted: Should the attack target one specific class.\n        :type targeted: `bool`\n        :param learning_rate: The initial learning rate for the attack algorithm. Smaller values produce better\n               results but are slower to converge.\n        :type learning_rate: `float`\n        :param binary_search_steps: Number of times to adjust constant with binary search (positive value).\n        :type binary_search_steps: `int`\n        :param max_iter: The maximum number of iterations.\n        :type max_iter: `int`\n        :param beta: Hyperparameter trading off L2 minimization for L1 minimization.\n        :type beta: `float`\n        :param initial_const: The initial trade-off constant `c` to use to tune the relative importance of distance\n               and confidence. If `binary_search_steps` is large, the initial constant is not important, as discussed in\n               Carlini and Wagner (2016).\n        :type initial_const: `float`\n        :param batch_size: Internal size of batches on which adversarial samples are generated.\n        :type batch_size: `int`\n        :param decision_rule: Decision rule. 'EN' means Elastic Net rule, 'L1' means L1 rule, 'L2' means L2 rule.\n        :type decision_rule: `string`\n        "
    super(ElasticNet, self).__init__(classifier)
    kwargs = {'confidence': confidence, 'targeted': targeted, 'learning_rate': learning_rate, 'binary_search_steps': binary_search_steps, 'max_iter': max_iter, 'beta': beta, 'initial_const': initial_const, 'batch_size': batch_size, 'decision_rule': decision_rule}
    assert self.set_params(**kwargs)