Skip to content

Estimator

Mojo struct 🡭

Estimator

@memory_only
struct Estimator

What a group of observations is reduced to. Pass one to barplot().

COUNT ignores the values and reports how many there were, so its interval is always empty – a count has no sampling error to estimate from the sample itself.

Aliases

  • MEAN = Estimator(Int(0))
  • MEDIAN = Estimator(Int(1))
  • COUNT = Estimator(Int(2))
  • SUM = Estimator(Int(3))

Implemented traits

AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable

Methods

__init__

fn def __init__(out self, value: Int)

Args:

  • value (Int)
  • self (Self)

Returns:

Self

__eq__

fn def __eq__(self, other: Self) -> Bool

Args:

  • self (Self)
  • other (Self)

Returns:

Bool

label

fn def label(self) -> String

A title-cased name for an axis label, so a chart of an estimate says which estimate it is.

Args:

  • self (Self)

Returns:

String