NormalizedDotProductMetric#
- class kikuchipy.indexing.NormalizedDotProductMetric(n_experimental_patterns: int | None = None, n_dictionary_patterns: int | None = None, navigation_mask: ndarray | None = None, signal_mask: ndarray | None = None, dtype: str | dtype | type = 'float32', rechunk: bool = False)[source]#
Bases:
SimilarityMetricSimilarity metric implementing the normalized dot product [Chen et al., 2015].
The metric is defined as
\[\rho = \frac {\langle \mathbf{X}, \mathbf{Y} \rangle} {||\mathbf{X}|| \cdot ||\mathbf{Y}||},\]where \({\langle \mathbf{X}, \mathbf{Y} \rangle}\) is the dot (inner) product of the pattern vectors \(\mathbf{X}\) and \(\mathbf{Y}\).
See
SimilarityMetricfor the description of the initialization parameters and the list of attributes.Attributes
Methods