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.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ GoogleCloudMlV1SampledShapleyAttribution
Returns a new instance of GoogleCloudMlV1SampledShapleyAttribution.
1400 1401 1402 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1400 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
1398 1399 1400 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1398 def num_paths @num_paths end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1405 1406 1407 |
# File 'generated/google/apis/ml_v1/classes.rb', line 1405 def update!(**args) @num_paths = args[:num_paths] if args.key?(:num_paths) end |