class_docstr: Dictionary of parameters to specify how to XRAI and return outputs.
class_docstr_tok: ["Dictionary","of","parameters","to","specify","how","to","XRAI","and","return","outputs","."]
code: def __init__(
      self,
      steps=100,
      area_threshold=1.0,
      return_baseline_predictions=False,
      return_ig_attributions=False,
      return_xrai_segments=False,
      flatten_xrai_segments=True,
      algorithm="full",
  ):
      # TODO(tolgab) add return_ig_for_every_step functionality
  
      # Number of steps to use for calculating the Integrated Gradients
      # attribution. The higher the number of steps the higher is the precision
      # but lower the performance. (see also XRAIOutput.error).
      self.steps = steps
      # The fraction of the image area that XRAI should calculate the segments
      # for. All segments that exceed that threshold will be merged into a single
      # segment. The parameter is used to accelerate the XRAI computation if the
      # caller is only interested in the top fraction of segments, e.g. 20%. The
      # value should be in the [0.0, 1.0] range, where 1.0 means that all segments
      # should be returned (slowest). Fast algorithm ignores this setting.
      self.area_threshold = area_threshold
      # TODO(tolgab) Enable return_baseline_predictions
      # If set to True returns predictions for the baselines as float32 [B] array,
      # where B is the number of baselines. (see XraiOutput.baseline_predictions).
      # self.return_baseline_predictions = return_baseline_predictions
      # If set to True, the XRAI output returns Integrated Gradients attributions
      # for every baseline. (see XraiOutput.ig_attribution)
      self.return_ig_attributions = return_ig_attributions
      # If set to True the XRAI output returns XRAI segments in the order of their
      # importance. This parameter works in conjunction with the
      # flatten_xrai_sements parameter. (see also XraiOutput.segments)
      self.return_xrai_segments = return_xrai_segments
      # If set to True, the XRAI segments are returned as an integer array with
      # the same dimensions as the input (excluding color channels). The elements
      # of the array are set to values from the [1,N] range, where 1 is the most
      # important segment and N is the least important segment. If
      # flatten_xrai_sements is set to False, the segments are returned as a
      # boolean array, where the first dimension has size N. The [0, ...] mask is
      # the most important and the [N-1, ...] mask is the least important. This
      # parameter has an effect only if return_xrai_segments is set to True.
      self.flatten_xrai_segments = flatten_xrai_segments
      # Specifies a flavor of the XRAI algorithm. full - executes slower but more
      # precise XRAI algorithm. fast - executes faster but less precise XRAI
      # algorithm.
      self.algorithm = algorithm
      # EXPERIMENTAL - Contains experimental parameters that may change in future.
      self.experimental_params = {"min_pixel_diff": 50}
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from .base import CoreSaliency
  from .integrated_gradients import IntegratedGradients
  import numpy
  from skimage import segmentation
  from skimage.morphology import dilation
  from skimage.morphology import disk
  from skimage.transform import resize
label_desc: Use image node_id 1 to create a new XRAIParameters object from inherited base classes: object with example: obj = XRAIParameters(steps, area_threshold, return_baseline_predictions, return_ig_attributions, return_xrai_segments, flatten_xrai_segments, algorithm)