*2.4. Code2Vect*

*Code2Vect* [13] maps data into a vector space where the distance between points is proportional to the difference of the QoI associated with those points, as sketched in Figure 2.

**Figure 2.** Input space *ξ* (**left**) and target vector space **z** (**righ**t).

We assume the available data consisting of <sup>P</sup> *<sup>d</sup>*-dimensional arrays, *<sup>ξ</sup><sup>i</sup>* <sup>∈</sup> <sup>R</sup>*<sup>d</sup>* , with a QoI O*<sup>i</sup>* associated with each datum. The images, **<sup>z</sup>***<sup>i</sup>* <sup>∈</sup> <sup>R</sup>*<sup>q</sup>* (*q* = 2 in our numerical implementation for the sake of visualization clarity), results from

$$\mathbf{z}\_{i} = \mathbf{W}\mathbf{\tilde{\xi}}\_{i\prime} \quad i = 1, \ldots, \mathbf{P}, \tag{21}$$

that preserves the quantity of interest associated with is origin point *ξ<sup>i</sup>* , denoted by O*<sup>i</sup>* .

In order to place points such that distances scales with their QoI differences we enforce

$$(\mathbf{W}(\mathfrak{F}\_{i}-\mathfrak{F}\_{j})) \cdot \mathbf{W}(\mathfrak{F}\_{i}-\mathfrak{F}\_{j})) = \|\mathbf{z}\_{i}-\mathbf{z}\_{j}\|^{2} = |\mathcal{O}\_{i} - \mathcal{O}\_{j}|.\tag{22}$$

Thus, there are P 2 <sup>2</sup> − P relations to determine the *q* × *d* + P × *q* unknowns. Linear mappings are limited and do not allow proceeding in nonlinear settings. Thus, a better choice consists of a nonlinear mapping **W**(*ξ*), expressible as a general polynomial form.
