measurement
mlte/measurement/measurement.py
Superclass for all measurements.
Measurement
The superclass for all model measurements.
Source code in mlte/measurement/measurement.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
|
metadata = EvidenceMetadata(measurement_type=type(instance).__name__, identifier=Identifier(name=identifier), info=info)
instance-attribute
The metadata for the measurement instance.
__call__(*args, **kwargs)
abstractmethod
Evaluate a measurement and return a value semantics.
Source code in mlte/measurement/measurement.py
44 45 46 47 |
|
__init__(instance, identifier, info=None)
Initialize a new Measurement instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
Measurement
|
The invoking instance (Measurement subclass) |
required |
identifier
|
str
|
A unique identifier for the instance |
required |
Source code in mlte/measurement/measurement.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
__str__()
Return a string representation of a Measurement.
Source code in mlte/measurement/measurement.py
65 66 67 |
|
__subclasshook__(subclass)
classmethod
Define the interface for all concrete measurements.
Source code in mlte/measurement/measurement.py
23 24 25 26 |
|
evaluate(*args, **kwargs)
Evaluate a measurement and return a value with semantics.
Returns:
Type | Description |
---|---|
Value
|
The resulting value of measurement execution, with semantics |
Source code in mlte/measurement/measurement.py
49 50 51 52 53 54 55 56 57 |
|
value()
classmethod
Returns the class type object for the Value produced by the Measurement.
Source code in mlte/measurement/measurement.py
59 60 61 62 63 |
|