evolver.calibration.interface.Transformer
- class evolver.calibration.interface.Transformer(*args, name: str = None, auto_config=True, auto_config_ignore_fields=None, **kwargs)[source]
Base Interface class for implementing transformations.
A modular layer for encapsulating the transformation and conversion methods between, e.g., raw and un-raw values, or conversion between units etc. This can also be used for such transformations as needed for transforming between uncalibrated and calibrated values.
Methods
__init__(*args[, name, auto_config, ...])auto_assign_attrs_from_config(kwargs[, ...])Auto instance attribute assignment functionality via
cls.Configintrospection.convert_from(*args, **kwargs)Implement and return some transformation upon the input.
convert_to(*args, **kwargs)Implement and return some transformation upon the input.
create([config])Create an instance from a config.
fit(*args, **kwargs)Override to implement a fitting function responsible for returning a
Configinstance that can then be used forconvert_toandconvert_from.init_descriptors(**non_config_kwargs)Automatically walk over all vars and instantiate any that are ConfigDescriptors.
post_init_vars(*args, **kwargs)A hook to override and perform additional initialization after instance attrs are assigned but before any
ConfigDescriptorare converted toclassinfoobjects.refit(*args, **kwargs)Attributes
classinfoReturn the class' fully qualified name.
configReturn a dict of Config populated from instance attributes.
config_jsonReturn a JSON str from a Config populated from instance attributes.
config_modelReturn an instance of Config populated from instance attributes.
descriptorReturn a
ConfigDescriptor.statusOverride to return an instance of Status indicating whether the associated transformation config parameters are OK to use or should be considered stale and recalibrated.