Class: Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb
Overview
Specification for how the data should be sliced.
Defined Under Namespace
Classes: ConfigsEntry, Range, SliceConfig, Value
Instance Attribute Summary collapse
-
#configs ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec::SliceConfig}
Mapping configuration for this SliceSpec.
Instance Attribute Details
#configs ⇒ ::Google::Protobuf::Map{::String => ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec::SliceConfig}
Returns Mapping configuration for this SliceSpec. The key is the name of the feature. By default, the key will be prefixed by "instance" as a dictionary prefix for Vertex Batch Predictions output format.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb', line 86 class SliceSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Specification message containing the config for this SliceSpec. # When `kind` is selected as `value` and/or `range`, only a single slice # will be computed. # When `all_values` is present, a separate slice will be computed for # each possible label/value for the corresponding key in `config`. # Examples, with feature zip_code with values 12345, 23334, 88888 and # feature country with values "US", "Canada", "Mexico" in the dataset: # # Example 1: # # { # "zip_code": { "value": { "float_value": 12345.0 } } # } # # A single slice for any data with zip_code 12345 in the dataset. # # Example 2: # # { # "zip_code": { "range": { "low": 12345, "high": 20000 } } # } # # A single slice containing data where the zip_codes between 12345 and # 20000 For this example, data with the zip_code of 12345 will be in this # slice. # # Example 3: # # { # "zip_code": { "range": { "low": 10000, "high": 20000 } }, # "country": { "value": { "string_value": "US" } } # } # # A single slice containing data where the zip_codes between 10000 and # 20000 has the country "US". For this example, data with the zip_code of # 12345 and country "US" will be in this slice. # # Example 4: # # { "country": {"all_values": { "value": true } } } # # Three slices are computed, one for each unique country in the dataset. # # Example 5: # # { # "country": { "all_values": { "value": true } }, # "zip_code": { "value": { "float_value": 12345.0 } } # } # # Three slices are computed, one for each unique country in the dataset # where the zip_code is also 12345. For this example, data with zip_code # 12345 and country "US" will be in one slice, zip_code 12345 and country # "Canada" in another slice, and zip_code 12345 and country "Mexico" in # another slice, totaling 3 slices. # @!attribute [rw] value # @return [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec::Value] # A unique specific value for a given feature. # Example: `{ "value": { "string_value": "12345" } }` # @!attribute [rw] range # @return [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec::Range] # A range of values for a numerical feature. # Example: `{"range":{"low":10000.0,"high":50000.0}}` # will capture 12345 and 23334 in the slice. # @!attribute [rw] all_values # @return [::Google::Protobuf::BoolValue] # If all_values is set to true, then all possible labels of the keyed # feature will have another slice computed. # Example: `{"all_values":{"value":true}}` class SliceConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A range of values for slice(s). # `low` is inclusive, `high` is exclusive. # @!attribute [rw] low # @return [::Float] # Inclusive low value for the range. # @!attribute [rw] high # @return [::Float] # Exclusive high value for the range. class Range include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Single value that supports strings and floats. # @!attribute [rw] string_value # @return [::String] # String type. # @!attribute [rw] float_value # @return [::Float] # Float type. class Value include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice::Slice::SliceSpec::SliceConfig] class ConfigsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |