Class: Google::Apis::PredictionV1_4::Training::ModelInfo
- Inherits:
-
Object
- Object
- Google::Apis::PredictionV1_4::Training::ModelInfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/prediction_v1_4/classes.rb,
generated/google/apis/prediction_v1_4/representations.rb,
generated/google/apis/prediction_v1_4/representations.rb
Overview
Model metadata.
Instance Attribute Summary collapse
-
#class_weighted_accuracy ⇒ Float
Estimated accuracy of model taking utility weights into account [Categorical models only].
-
#classification_accuracy ⇒ Float
A number between 0.0 and 1.0, where 1.0 is 100% accurate.
-
#confusion_matrix ⇒ Hash<String,Hash<String,Float>>
An output confusion matrix.
-
#confusion_matrix_row_totals ⇒ Hash<String,Float>
A list of the confusion matrix row totals Corresponds to the JSON property
confusionMatrixRowTotals
. -
#mean_squared_error ⇒ Float
An estimated mean squared error.
-
#model_type ⇒ String
Type of predictive model (CLASSIFICATION or REGRESSION) Corresponds to the JSON property
modelType
. -
#number_instances ⇒ Fixnum
Number of valid data instances used in the trained model.
-
#number_labels ⇒ Fixnum
Number of class labels in the trained model [Categorical models only].
Instance Method Summary collapse
-
#initialize(**args) ⇒ ModelInfo
constructor
A new instance of ModelInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ModelInfo
Returns a new instance of ModelInfo
286 287 288 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 286 def initialize(**args) update!(**args) end |
Instance Attribute Details
#class_weighted_accuracy ⇒ Float
Estimated accuracy of model taking utility weights into account [Categorical
models only].
Corresponds to the JSON property classWeightedAccuracy
239 240 241 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 239 def class_weighted_accuracy @class_weighted_accuracy end |
#classification_accuracy ⇒ Float
A number between 0.0 and 1.0, where 1.0 is 100% accurate. This is an estimate,
based on the amount and quality of the training data, of the estimated
prediction accuracy. You can use this is a guide to decide whether the results
are accurate enough for your needs. This estimate will be more reliable if
your real input data is similar to your training data [Categorical models only]
.
Corresponds to the JSON property classificationAccuracy
249 250 251 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 249 def classification_accuracy @classification_accuracy end |
#confusion_matrix ⇒ Hash<String,Hash<String,Float>>
An output confusion matrix. This shows an estimate for how this model will do
in predictions. This is first indexed by the true class label. For each true
class label, this provides a pair predicted_label, count
, where count is the
estimated number of times the model will predict the predicted label given the
true label. Will not output if more then 100 classes [Categorical models only].
Corresponds to the JSON property confusionMatrix
258 259 260 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 258 def confusion_matrix @confusion_matrix end |
#confusion_matrix_row_totals ⇒ Hash<String,Float>
A list of the confusion matrix row totals
Corresponds to the JSON property confusionMatrixRowTotals
263 264 265 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 263 def confusion_matrix_row_totals @confusion_matrix_row_totals end |
#mean_squared_error ⇒ Float
An estimated mean squared error. The can be used to measure the quality of the
predicted model [Regression models only].
Corresponds to the JSON property meanSquaredError
269 270 271 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 269 def mean_squared_error @mean_squared_error end |
#model_type ⇒ String
Type of predictive model (CLASSIFICATION or REGRESSION)
Corresponds to the JSON property modelType
274 275 276 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 274 def model_type @model_type end |
#number_instances ⇒ Fixnum
Number of valid data instances used in the trained model.
Corresponds to the JSON property numberInstances
279 280 281 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 279 def number_instances @number_instances end |
#number_labels ⇒ Fixnum
Number of class labels in the trained model [Categorical models only].
Corresponds to the JSON property numberLabels
284 285 286 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 284 def number_labels @number_labels end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
291 292 293 294 295 296 297 298 299 300 |
# File 'generated/google/apis/prediction_v1_4/classes.rb', line 291 def update!(**args) @class_weighted_accuracy = args[:class_weighted_accuracy] if args.key?(:class_weighted_accuracy) @classification_accuracy = args[:classification_accuracy] if args.key?(:classification_accuracy) @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix) @confusion_matrix_row_totals = args[:confusion_matrix_row_totals] if args.key?(:confusion_matrix_row_totals) @mean_squared_error = args[:mean_squared_error] if args.key?(:mean_squared_error) @model_type = args[:model_type] if args.key?(:model_type) @number_instances = args[:number_instances] if args.key?(:number_instances) @number_labels = args[:number_labels] if args.key?(:number_labels) end |