Class: Google::Apis::LanguageV2::XpsResponseExplanationParameters

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/language_v2/classes.rb,
lib/google/apis/language_v2/representations.rb,
lib/google/apis/language_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ XpsResponseExplanationParameters

Returns a new instance of XpsResponseExplanationParameters.



3047
3048
3049
# File 'lib/google/apis/language_v2/classes.rb', line 3047

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#integrated_gradients_attributionGoogle::Apis::LanguageV2::XpsIntegratedGradientsAttribution

An attribution method that computes the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365 Corresponds to the JSON property integratedGradientsAttribution



3037
3038
3039
# File 'lib/google/apis/language_v2/classes.rb', line 3037

def integrated_gradients_attribution
  @integrated_gradients_attribution
end

#xrai_attributionGoogle::Apis::LanguageV2::XpsXraiAttribution

An explanation method that redistributes Integrated Gradients attributions to segmented regions, taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906. 02825 Only supports image Models (modality is IMAGE). Corresponds to the JSON property xraiAttribution



3045
3046
3047
# File 'lib/google/apis/language_v2/classes.rb', line 3045

def xrai_attribution
  @xrai_attribution
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3052
3053
3054
3055
# File 'lib/google/apis/language_v2/classes.rb', line 3052

def update!(**args)
  @integrated_gradients_attribution = args[:integrated_gradients_attribution] if args.key?(:integrated_gradients_attribution)
  @xrai_attribution = args[:xrai_attribution] if args.key?(:xrai_attribution)
end