Class: Google::Apis::BigqueryV2::ClusteringMetrics

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

Overview

Evaluation metrics for clustering models.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ClusteringMetrics

Returns a new instance of ClusteringMetrics.



1345
1346
1347
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1345

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

Instance Attribute Details

#clustersArray<Google::Apis::BigqueryV2::Cluster>

Information for all clusters. Corresponds to the JSON property clusters



1333
1334
1335
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1333

def clusters
  @clusters
end

#davies_bouldin_indexFloat

Davies-Bouldin index. Corresponds to the JSON property daviesBouldinIndex

Returns:

  • (Float)


1338
1339
1340
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1338

def davies_bouldin_index
  @davies_bouldin_index
end

#mean_squared_distanceFloat

Mean of squared distances between each sample to its cluster centroid. Corresponds to the JSON property meanSquaredDistance

Returns:

  • (Float)


1343
1344
1345
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1343

def mean_squared_distance
  @mean_squared_distance
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1350
1351
1352
1353
1354
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1350

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