CADETProcess.comparison.Shape#
- class CADETProcess.comparison.Shape(reference, components=None, use_total_concentration=False, use_total_concentration_components=True, start=None, end=None, transform=None, resample=True, smooth=False, normalize=False)[source]#
Shape similarity difference metric.
The similarity is calculated using the Pearson correlation between the reference and solution profiles, as well as the time offset between their peak positions, and the peak height of the solution profile. Additionally, if use_derivative is set to True, the similarity is also calculated using the Pearson correlation of the derivative profiles, and the minimum and maximum peak heights of the derivative profile.
- Raises:
- CADETProcessError
If components is not None and has more than one element.
Notes
Currently, this class only works for single-component systems with one peak.
- Attributes:
n_metrics
intint: Number of metrics.
- labelslist of str
List of labels for each similarity metric calculated by the class.
Methods
__call__
(solution)Compute the difference between the reference solution and the input solution.
Decorator to automatically check reference and solution dimensions.
evaluate
(solution)Compute the difference between the reference solution and the input solution.
Decorator to automatically smooth and normalize solution.
slice_and_transform
(solution)Slice the solution and applies the transform callable (if defined).
Decorator to automatically slice solution.
Decorator to automatically transform solution data.