FloatHistogram

class verta.data_types.FloatHistogram(bucket_limits, data)

Representation of a float histogram.

Parameters:
  • bucket_limits (list of float) – Boundary values between buckets.

  • data (list of int) – Counts for each bucket.

Examples

from verta.data_types import FloatHistogram
data = FloatHistogram(
    bucket_limits=[1, 13, 25, 37, 49, 61],
    data=[15, 53, 91, 34, 7],
)
run.log_attribute("age_histogram", data)
diff(other)

Calculate the difference between other and this value.

Parameters:

other (FloatHistogram) – Value to calculate difference from.

Returns:

float – Cosine distance between the normalized bucket values.