magni.utils.validation.types module¶
Module providing abstract superclasses for validation.
Routine listings¶
- MatrixBase(object)
- Abstract base class of custom matrix classes.
- MMSEInputChannel(object)
- Abstract base class of a Minimum Mean Squaread Error (MMSE) input channel.
- StopCriterion(object)
- Abstract base class of a stop criterion.
- ThresholdOperator(object)
- Abstract base class of a threshold operator.
-
class
magni.utils.validation.types.MatrixBase(dtype, bounds, shape)[source]¶ Bases:
objectAbstract base class of custom matrix classes.
The
magni.utils.validation.validate_numericfunction accepts built-in numeric types, numpy built-in numeric types, and subclasses of the present class. In order to perform validation checks, the validation function needs to know the data type, the bounds, and the shape of the variable. Thus, subclasses must call the init function of the present class with these arguments.Parameters: - dtype (type) – The data type of the values of the instance.
- bounds (list or tuple) – The bounds of the values of the instance.
- shape (list or tuple) – The shape of the instance.
-
bounds¶ list or tuple – The bounds of the values of the instance.
-
dtype¶ type – The data type of the values of the instance.
-
shape¶ list or tuple – The shape of the instance.
Notes
dtypeis either a built-in numeric type or a numpy built-in numeric type.If the matrix has complex values,
boundsis a list with two values; The bounds on the real values and the bounds on the imaginary values. If, on the other hand, the matrix has real values,boundshas one value; The bounds on the real values. Each such bounds value is a list with two real, numeric values; The lower bound (that is, the minimum value) and the upper bound (that is, the maximum value).-
bounds
-
dtype
-
shape
-
class
magni.utils.validation.types.MMSEInputChannel(var)[source]¶ Bases:
objectAbstract base class of a Minimum Mean Squaread Error (MMSE) input channel.
The
magni.cs.reconstructionalgorithms may make use of input channels to define the prior knowledge on the sought solution. In order for the validation of such an input channel to work, it must be based on this class.Parameters: var (dict) – The input channel state variables.
-
class
magni.utils.validation.types.MMSEOutputChannel(var)[source]¶ Bases:
objectAbstract base class of a Minimum Mean Squaread Error (MMSE) output channel.
The
magni.cs.reconstructionalgorithms may make use of output channels to define the observation model. In order for the validation of such an output channel to work, it must be based on this class.Parameters: var (dict) – The output channel state variables.
-
class
magni.utils.validation.types.StopCriterion(var)[source]¶ Bases:
objectAbstract base class of a stop criterion.
The
magni.cs.reconstructionalgorithms are typically iterative algorithms that make use of some stop criterion to determine if it has converged. In order for the validation of such a stop criterion to work, it must be based on this class.Parameters: var (dict) – The stop criterion state variables.
-
class
magni.utils.validation.types.ThresholdOperator(var)[source]¶ Bases:
objectAbstract base class of a threshold operator.
The
magni.cs.reconstructionalgorithms may make use of threshold operators for “de-noising”. In order for the validation of such a threshold operator to work, it must be based on this class.Parameters: var (dict) – The threshold operator state variables. -
compute_deriv_threshold(var)[source]¶ Compute the entrywise derivative threshold.
Parameters: var (dict) – The variables used in computing the derivative threshold. Returns: eta_deriv (ndarray) – The computed entrywise derivative threshold.
-