mt_metadata.features.weights.monotonic_weight_kernel ==================================================== .. py:module:: mt_metadata.features.weights.monotonic_weight_kernel Classes ------- .. autoapisummary:: mt_metadata.features.weights.monotonic_weight_kernel.ThresholdEnum mt_metadata.features.weights.monotonic_weight_kernel.StyleEnum mt_metadata.features.weights.monotonic_weight_kernel.MonotonicWeightKernel Module Contents --------------- .. py:class:: ThresholdEnum Bases: :py:obj:`mt_metadata.common.enumerations.StrEnumerationBase` str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'. .. py:attribute:: low_cut :value: 'low cut' .. py:attribute:: high_cut :value: 'high cut' .. py:class:: StyleEnum Bases: :py:obj:`mt_metadata.common.enumerations.StrEnumerationBase` str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'. .. py:attribute:: taper :value: 'taper' .. py:attribute:: activation :value: 'activation' .. py:class:: MonotonicWeightKernel(**data) Bases: :py:obj:`mt_metadata.features.weights.base.Base` MonotonicWeightKernel Base class for monotonic weight kernels. Handles bounds, normalization, and direction. A weighting kernel that applies a monotonic activation/taper function between defined lower and upper bounds, based on a given threshold direction. There are two main types of monotonic kernels: taper and activation. The taper function is used to smoothly transition between the lower and upper bounds over some finite interval, while the activation style offers options that asymptote to 0 or 1, such as sigmoid or tanh. Thus the activation style supports +/- infinity bounds, while the taper style requires finite bounds. .. py:attribute:: threshold :type: Annotated[ThresholdEnum, Field(default=ThresholdEnum.low_cut, description='Which side of a threshold should be downweighted.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['low cut']})] .. py:attribute:: style :type: Annotated[StyleEnum, Field(default=StyleEnum.taper, description='Tapering/activation function to use between transition bounds.', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['activation']})] .. py:attribute:: transition_lower_bound :type: Annotated[float, Field(default=-1000000000.0, description='Start of the taper region (weight begins to change).', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['-inf']})] .. py:attribute:: transition_upper_bound :type: Annotated[float, Field(default=1000000000.0, description='End of the taper region (weight finishes changing).', alias=None, json_schema_extra={'units': None, 'required': True, 'examples': ['+inf']})]