## 2 Similarity Space  
Our goal is to design a similarity metric that could be used widely in data mining and text clustering methods and with great precision. This places demands on the properties of the similarity metric. We may ask ourselves the following questions: What is the ideal similarity function? What should it look like? What properties should it have? Compliance with the metric axioms is a very common requirement. As we have already shown, there are similarity metric axioms that define such nice properties, cf. [43]. We have also shown the duality of such similarity axioms with metric axioms. We can think of a similarity metric as equivalent to the axioms of an 'inverse' distance metric, or, vice versa, we can think of a distance metric as the 'inversion' of a similarity metric. Here, we recall some necessary definitions [43]. **Definition 1** (Similarity Space [43]). : _Consider a non-empty set \(\mathbf{X}\) and a function, \(s\colon\mathbf{X}\times\mathbf{X}\to\mathbb{R}\), which is a similarity metric if, for all elements, \(x,y,z\in\mathbf{X}\), it satisfies the following axioms:_  
1. \(s(x,y)=s(y,x)\) _(symmetry);_
2. \(s(x,z)+s(y,y)\geq s(x,y)+s(y,z)\) _(triangle inequality);_
3. \(s(x,x)=s(x,y)=s(y,y)\Longleftrightarrow x=y\) _(identity of indiscernibles);_
4. \(s(x,y)\geq 0\) _(non-negativity)._  
A similarity space is an ordered pair \((\mathbf{X},s)\). **Definition 2** (Normalized Similarity Metric). : _Let \(\mathcal{R}1\) be a non-empty set. A function, \(sn(x,y)\colon\mathbf{X}\times\mathbf{X}\to[0,1]\subset\mathbb{R}\), is a normalized similarity metric if, for all elements, \(x,y,z\in\mathbf{X}\), it satisfies the following axioms:_  
1. \(s_{n}(x,y)=s_{n}(y,x)\) _(symmetry);_
2. \(s_{n}(x,z)+1\geq s_{n}(x,y)+s_{n}(y,z)\) _(triangle inequality);_
3. \(s_{n}(x,y)=1\Longleftrightarrow x=y\) _(identity of indiscernibles);_
4. \(s_{n}(x,y)\geq 0\) _(non-negativity)._  
A normalized similarity space is an ordered pair, \((\mathbf{X},s_{n})\). **Theorem 1** (Convex Combinations). : _Consider the vectors \(\mathbf{x},\mathbf{y}\in\mathbf{X}_{1}^{m}\). A convex combination, \(T_{\mathbb{C}}\colon\mathbb{R}^{m}\times\mathbf{X}^{m}\times\mathbf{X}^{m}\to\mathbb{R}\), of normalized similarity metrics described by a vector, \(\mathbf{\alpha}=(\alpha_{1},\ldots,\alpha_{m})\), of weight coefficients is again a normalized similarity metric:_  
\[ \begin{split} s_{n}(\mathbf{x},\mathbf{y})&=T_{\mathbb{C}}( \mathbf{x},\mathbf{x},\mathbf{y})=\sum_{i=1}^{m}\alpha_{i}s_{i}(x_{i},y_{i})\\ &=\alpha_{1}s_{1}(x_{1},y_{1})+\alpha_{2}s_{2}(x_{2},y_{2})+ \cdots+\alpha_{m}s_{m}(x_{m},y_{m}),\end{split}  \tag{1}\]  
_such that \(\sum_{i=1}^{m}\alpha_{i}=1\) and \(0\leq\alpha_{i}\leq 1\)._  
Proof. : [43]. **Theorem 2** (Generalized Rozinek Similarity [43]). : _Suppose we are given a distance metric, \(d\colon\mathcal{R}1\times\mathbf{X}\to\mathbb{R}\), and a similarity metric, \(s\colon\mathbf{X}\times\mathbf{X}\to\mathbb{R}\). The generalized Rozinek similarity, \(sR\colon\mathbf{X}\times\mathbf{X}\to[0,1]\subset\mathbb{R}\), is a normalized similarity metric derived from an arbitrary distance metric, \(d(x,y)\), along with positive self-similarities, \(s(x,x)\) and \(s(y,y)\)._  
\[s_{R}(x,y)=\frac{s(x,x)+s(y,y)-d(x,y)}{s(x,x)+s(y,y)+d(x,y)}. \tag{2}\]  
Proof. : [43]. **Theorem 3** (Generalized Rozinek Distance [43]). : _Suppose we are given a normalized similarity metric, \(s_{n}\), and an arbitrary similarity metric, \(s\). The generalized Rozinek distance, \(d_{R}\colon\mathbf{X}\times\mathbf{X}\to\mathbb{R}\), is the distance metric derived from an arbitrary normalized similarity metric, \(s_{n}(x,y)\), and self-similarities \(s(x,x)\) and \(s(y,y)\) by_  
\[d_{R}(x,y)=\frac{1-s_{n}(x,y)}{1+s_{n}(x,y)}(s(x,x)+s(y,y)). \tag{3}\]  
Proof. : [43]. The previously introduced theorems are widely applicable for their generality and their unified theory. They have been mathematically proven to be valid for any measurable sets and functions, and include many existing distance and similarity metrics as special cases.