*3.2. Graph Representation*

An effective way to visualize all the stores and their similarities is by building a graph *G* = (*<sup>V</sup>*, *<sup>E</sup>*), where the vertices *V* represent the stores that are connected with an edge if their similarities are above a given threshold. As previously mentioned, each store can be represented as a *k*-dimensional histogram *H*(*si*). Therefore, the set of edges can be given by *E* = *si*,*sj* : *<sup>D</sup>H*(*si*), *H*(*sj*) < *τ*. Any distance between histograms can be used, and in this case, the Wasserstein distance (whose basic definition and properties are provided in Section 3) is considered. Figure 6 shows an example of the graph resulting from 4 KPIs and 50 stores. In this case, only the stores whose distances are below the first decile are connected.

**Figure 6.** Graph representation of 50 stores. Edges are colored from green to red based on the distance from each other.

## **4. Wasserstein Distance**
