Class: Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution
- Inherits:
-
Object
- Object
- Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/ml_v1/classes.rb,
generated/google/apis/ml_v1/representations.rb,
generated/google/apis/ml_v1/representations.rb
Overview
An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features.
Instance Attribute Summary collapse
-
#num_paths ⇒ Fixnum
The number of feature permutations to consider when approximating the Shapley values.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudMlV1SampledShapleyAttribution
constructor
A new instance of GoogleCloudMlV1SampledShapleyAttribution.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1SampledShapleyAttribution
Returns a new instance of GoogleCloudMlV1SampledShapleyAttribution.
2318 2319 2320 |
# File 'generated/google/apis/ml_v1/classes.rb', line 2318 def initialize(**args) update!(**args) end |
Instance Attribute Details
#num_paths ⇒ Fixnum
The number of feature permutations to consider when approximating the Shapley
values.
Corresponds to the JSON property numPaths
2316 2317 2318 |
# File 'generated/google/apis/ml_v1/classes.rb', line 2316 def num_paths @num_paths end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2323 2324 2325 |
# File 'generated/google/apis/ml_v1/classes.rb', line 2323 def update!(**args) @num_paths = args[:num_paths] if args.key?(:num_paths) end |