Class: Google::Apis::PredictionV1_6::Insert2::ModelInfo

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/prediction_v1_6/classes.rb,
generated/google/apis/prediction_v1_6/representations.rb,
generated/google/apis/prediction_v1_6/representations.rb

Overview

Model metadata.

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) ⇒ ModelInfo

Returns a new instance of ModelInfo.


597
598
599
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 597

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

Instance Attribute Details

#class_weighted_accuracyString

Estimated accuracy of model taking utility weights into account (Categorical models only). Corresponds to the JSON property classWeightedAccuracy

Returns:

  • (String)

564
565
566
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 564

def class_weighted_accuracy
  @class_weighted_accuracy
end

#classification_accuracyString

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

Returns:

  • (String)

574
575
576
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 574

def classification_accuracy
  @classification_accuracy
end

#mean_squared_errorString

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

Returns:

  • (String)

580
581
582
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 580

def mean_squared_error
  @mean_squared_error
end

#model_typeString

Type of predictive model (CLASSIFICATION or REGRESSION). Corresponds to the JSON property modelType

Returns:

  • (String)

585
586
587
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 585

def model_type
  @model_type
end

#number_instancesString

Number of valid data instances used in the trained model. Corresponds to the JSON property numberInstances

Returns:

  • (String)

590
591
592
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 590

def number_instances
  @number_instances
end

#number_labelsString

Number of class labels in the trained model (Categorical models only). Corresponds to the JSON property numberLabels

Returns:

  • (String)

595
596
597
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 595

def number_labels
  @number_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


602
603
604
605
606
607
608
609
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 602

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)
  @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