whylogs.core.metrics.metric_components
#
Module Contents#
Classes#
A metric component is the smallest unit for a metric. |
|
A metric component is the smallest unit for a metric. |
|
A metric component is the smallest unit for a metric. |
|
A metric component is the smallest unit for a metric. |
|
A metric component is the smallest unit for a metric. |
|
Abstract base class for generic types. |
Attributes#
- whylogs.core.metrics.metric_components.T#
- whylogs.core.metrics.metric_components.M#
- class whylogs.core.metrics.metric_components.Registries#
- aggregatorRegistry: Optional[whylogs.core.metrics.aggregators.AggregatorRegistry]#
- serializerRegistry: Optional[whylogs.core.metrics.serializers.SerializerRegistry]#
- deserializerRegistry: Optional[whylogs.core.metrics.deserializers.DeserializerRegistry]#
- class whylogs.core.metrics.metric_components.MetricComponent(value: T)#
Bases:
Generic
[T
]A metric component is the smallest unit for a metric.
A metric might consist of multiple components. An example is distribution metric, which consists of kll sketch for histogram, mean and m2. The calculation of components could be independent or could be coupled with other components.
- Parameters
value (T) –
- registries: Optional[Registries]#
- to_protobuf() whylogs.core.proto.MetricComponentMessage #
- Return type
whylogs.core.proto.MetricComponentMessage
- classmethod from_protobuf(msg: whylogs.core.proto.MetricComponentMessage, registries: Optional[Registries] = None) M #
- Parameters
msg (whylogs.core.proto.MetricComponentMessage) –
registries (Optional[Registries]) –
- Return type
M
- class whylogs.core.metrics.metric_components.IntegralComponent(value: T)#
Bases:
MetricComponent
[int
]A metric component is the smallest unit for a metric.
A metric might consist of multiple components. An example is distribution metric, which consists of kll sketch for histogram, mean and m2. The calculation of components could be independent or could be coupled with other components.
- Parameters
value (T) –
- mtype#
- registries: Optional[Registries]#
- to_protobuf() whylogs.core.proto.MetricComponentMessage #
- Return type
whylogs.core.proto.MetricComponentMessage
- classmethod from_protobuf(msg: whylogs.core.proto.MetricComponentMessage, registries: Optional[Registries] = None) M #
- Parameters
msg (whylogs.core.proto.MetricComponentMessage) –
registries (Optional[Registries]) –
- Return type
M
- class whylogs.core.metrics.metric_components.MinIntegralComponent(value: T)#
Bases:
MetricComponent
[int
]A metric component is the smallest unit for a metric.
A metric might consist of multiple components. An example is distribution metric, which consists of kll sketch for histogram, mean and m2. The calculation of components could be independent or could be coupled with other components.
- Parameters
value (T) –
- mtype#
- type_id = 1#
- registries: Optional[Registries]#
- to_protobuf() whylogs.core.proto.MetricComponentMessage #
- Return type
whylogs.core.proto.MetricComponentMessage
- classmethod from_protobuf(msg: whylogs.core.proto.MetricComponentMessage, registries: Optional[Registries] = None) M #
- Parameters
msg (whylogs.core.proto.MetricComponentMessage) –
registries (Optional[Registries]) –
- Return type
M
- class whylogs.core.metrics.metric_components.MaxIntegralComponent(value: T)#
Bases:
MetricComponent
[int
]A metric component is the smallest unit for a metric.
A metric might consist of multiple components. An example is distribution metric, which consists of kll sketch for histogram, mean and m2. The calculation of components could be independent or could be coupled with other components.
- Parameters
value (T) –
- mtype#
- type_id = 2#
- registries: Optional[Registries]#
- to_protobuf() whylogs.core.proto.MetricComponentMessage #
- Return type
whylogs.core.proto.MetricComponentMessage
- classmethod from_protobuf(msg: whylogs.core.proto.MetricComponentMessage, registries: Optional[Registries] = None) M #
- Parameters
msg (whylogs.core.proto.MetricComponentMessage) –
registries (Optional[Registries]) –
- Return type
M
- class whylogs.core.metrics.metric_components.FractionalComponent(value: T)#
Bases:
MetricComponent
[float
]A metric component is the smallest unit for a metric.
A metric might consist of multiple components. An example is distribution metric, which consists of kll sketch for histogram, mean and m2. The calculation of components could be independent or could be coupled with other components.
- Parameters
value (T) –
- mtype#
- registries: Optional[Registries]#
- to_protobuf() whylogs.core.proto.MetricComponentMessage #
- Return type
whylogs.core.proto.MetricComponentMessage
- classmethod from_protobuf(msg: whylogs.core.proto.MetricComponentMessage, registries: Optional[Registries] = None) M #
- Parameters
msg (whylogs.core.proto.MetricComponentMessage) –
registries (Optional[Registries]) –
- Return type
M
- class whylogs.core.metrics.metric_components.KllComponent#
Bases:
MetricComponent
[whylogs_sketching.kll_doubles_sketch
]- mtype#
- class whylogs.core.metrics.metric_components.HllComponent#
Bases:
MetricComponent
[whylogs_sketching.hll_sketch
]- mtype#
- class whylogs.core.metrics.metric_components.FrequentStringsComponent#
Bases:
MetricComponent
[whylogs_sketching.frequent_strings_sketch
]- mtype#
- class whylogs.core.metrics.metric_components.CustomComponent(value: T)#
Bases:
Generic
[T
],MetricComponent
[T
]Abstract base class for generic types.
A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:
class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc.
This class can then be used as follows:
def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default
- Parameters
value (T) –
- type_id#
- registries: Optional[Registries]#
- to_protobuf() whylogs.core.proto.MetricComponentMessage #
- Return type
whylogs.core.proto.MetricComponentMessage
- classmethod from_protobuf(msg: whylogs.core.proto.MetricComponentMessage, registries: Optional[Registries] = None) M #
- Parameters
msg (whylogs.core.proto.MetricComponentMessage) –
registries (Optional[Registries]) –
- Return type
M