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

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

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_pathsFixnum

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

Returns:

  • (Fixnum)


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