Class: Google::Apis::MlV1::GoogleCloudMlV1SampledShapleyAttribution

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/ml_v1/classes.rb,
lib/google/apis/ml_v1/representations.rb,
lib/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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudMlV1SampledShapleyAttribution

Returns a new instance of GoogleCloudMlV1SampledShapleyAttribution.



2336
2337
2338
# File 'lib/google/apis/ml_v1/classes.rb', line 2336

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

Instance Attribute Details

#num_pathsFixnum

The number of feature permutations to consider when approximating the Shapley values. Corresponds to the JSON property numPaths

Returns:

  • (Fixnum)


2334
2335
2336
# File 'lib/google/apis/ml_v1/classes.rb', line 2334

def num_paths
  @num_paths
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2341
2342
2343
# File 'lib/google/apis/ml_v1/classes.rb', line 2341

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