Index spaces and standard indices in metric modelling *

. We analyze the basic structure of certain metric models, which are constituted by an index I acting on a metric space ( D, d ) representing a relevant property of the elements of D . We call such a structure ( D, d, I ) an index space and deﬁne on it normalization and consistency constants that measure to what extent I is compatible with the metric d . The “best” indices are those with such constants equal to 1 (standard indices), and we show an approximation method for other indices using them. With the help of Lipschitz extensions, we show how to apply these tools: a new model for the triage process in the emergency department of a hospital is presented.


Introduction
Ratings and indices are used today as elementary but fundamental tools that enable individuals and institutions to make relevant strategic decisions. For example, in the specific field of education, indices have been widely used in the context of higher education (ARWU, QS World University Ranking, Webometrics, see, for example, [1]); also, control and monitoring of the economy of countries is mainly based on indices and rankings (see [4,17,22]). Our conceptualization of these models takes the form of a mathematical structure that makes it possible to control the construction of a given index by ensuring its consistency with the distance between the elements of the underlying metric model.
Due to the mathematical nature of the present paper, let us mention first the main reference that appears when we check the scientific literature regarding indices and rankings. Directly related to statistical arguments, the theory of rankings is understood to be the study of how, given a matrix of scores (for example, given by the pairwise comparison among the elements of a set), a ranking for these elements can be set according to the given relations. This happens, for example, when we have several teams playing against each other in a soccer league and we know already a part the results. The reader can find a complete explanation of related methods in [11] and the references therein. These methods provide different ways of giving orderings among the elements of the set based on the known data, but they are not centered in the definition of a similarity relation given by a distance among the elements. Therefore, although the relations with our purpose can be checked, the starting point of the method is exactly the opposite one to ours since there is no an underlying metric space: ordered differences among elements rather than similarities are used. Indices are also useful in image processing in which some tools are defined using specific indices in order to measure similarity of pictures. For instance, in [6], it can be found a complete explanation of use of such an instrument, this time in a metric space framework as in the case that we show in the present paper.
Theoretical approaches based on families of rankings that have already been proven by use can also be found. In [5], the comparison between the different approaches is used to obtain a general idea of what a ranking should be, which allows to give the foundations of a common framework of analysis at least in a specific area. Other relevant example of the analysis of ranking and indices is the paper [22] in which a systematic method for defining coherent rankings and ratings is presented. A great effort is made to analyze the correctness and applicability of the indexes, producing a decalogue of rules to develop multidimensional measures. Essentially, this decalogue-which can be structured as a sequence of consecutive steps to be applied-can be summarized as follows: a first step for the construction of the theoretical framework, a second step of data selection and processing, a third step that refers to mathematical (mainly statistical) processing, and a last step that refers to data synthesis and visualization. Let us briefly explain how these items fit into the general scheme of our mathematical construction: (i) In our purpose, the first step (theoretical framework) is used to define a metric space: the set of entities on which the model works is first fixed. Then we use a distance to quantify similarity among these elements. (ii) An index in it (the essence of any ranking, rating or indicator construction) is nothing more than a positive function that is intended to be consistent with the metric. Small distances in the metric space have to be reflected in small differences between index values: Lipschitz functions appear. (iii) The analysis of the resulting metric/index structure together with statistics and data visualization come into play to provide the final results.
Let us see a concrete example. We begin by considering a general class that we want to analyze, that is, the set D to which the final index should be applied: the set of all https://www.journals.vu.lt/nonlinear-analysis universities in a country. Consider then some variables to compare them; for example, the overall funding of the institution per year or the number of students. Using them, we can define a distance d between two universities: for example, the norm of the vector provided by the values of these variables.
Let us now suppose that we intend to define an index I in this metric space (a positive real number), which will allow in the next step to define a ranking, given canonically by the order provided by the index. We need it to be coherent with the metric d in space since this structure represents the properties that we are interested in taking into account for our analysis. A trivial example of such a "coherent" index is given by the distance itself as follows: for all b ∈ D, we define I 0 by I 0 (b) := d(a 0 , b), where a 0 ∈ D is a fixed element of D. Indices defined in this way will play a central role in the paper and will be called standard indices. For example, the element a 0 could be the best university in a given country, and so the index measures how far any other university is from meeting the standards of a 0 . Putting the three objects together-a set D, a metric d and an index I-, we get what we call an index space (D, d, I). This has been called a metric-index model in [10] in the context of the extension of indexes defined for university rankings.
This structure can be understood as a general analytical instrument. For example, imputation of data is an important process in modeling, especially, in the case of index construction. An up-to-date survey on the subject can be found at [13] (see also [18] and the references therein). The problem of giving concrete values of a given index when we do not control all the variables in its definition becomes a central issue in many cases. The Lipschitz extension can be used as a method for data imputation when the statistical methods are not adequate. This is why we also study the extension of the indices as Lipschitz functions: they allow to fill in missing values of the indices preserving the similarity relations (distances).
The paper is organized as follows. In Section 2, main concepts and definitions are introduced. Section 3 is devoted to the development of the main mathematical results on the indexable spaces and index spaces: natural topologies, relevant subsets, compactness results, approximation and extension of indices. In Section 4, we will show the compatibility of the classical formulas for the extension of Lipschitz functions with the original metric structure of the indices, providing in this way an analytical tool for seeing how far extensions can be represented by means of standard indices. Other extension formulas coming from what are called absolutely minimizing Lipschitz extensions ensure a better local behavior than the ones we propose (see [2,14]), and could be also used in further studies; however, this research plan exceeds the aim of the present paper. Finally (Section 5), we show as an example how to apply our general technique for creating a triage automatic system to establish the order of attendance in an emergency service of a hospital based on the professional experience of some doctors.

Basic definitions
We present in this section the basic definitions and results that are needed in the paper. All of them can be found in books on general topology as [15,21]. If R + is the set of positive real numbers (including 0), we define a distance (or a metric) in a set D as a function d : In [9], the interested reader can find a lot of examples and particular metrics constructed for solving specific problems. Each metric defines a topology on the space D in which it is defined, that has a basis of neighborhoods of any element x ∈ D the balls B ε (x) = {y ∈ D: d(a, b) < ε}, ε > 0. These sets give an intuitive idea of what a distance is in terms of who the neighbors of a given element a are: an element b belongs to B ε (x) if it is as close as ε to a; the lower the ε, the higher the closeness from b to a.
A function acting in a metric space (D, d) and with values on other metric space (R, r) is said to be Lipschitz if r(f (a), f (b)) Kd(a, b) holds for a certain constant K > 0 and for every a, b ∈ D. The Lipschitz constant of f is the infimum of the constants K in the inequality. In case we have to refer to the function, we will write Lip(f ) for it, but often we will use simply K in case this reference is not needed. Although the definitions and results on Lipschitz functions can be found in a lot of works, we mainly use the recent exhaustive book [8].
The main reason for using this family of functions is the useful extension formulas that can be applied for them. This will allow to apply our model for the construction of specific indices and its generalization to a broader class of institutions of education. The McShane-Whitney theorem establishes that if B is a subspace of a metric space (D, d) and f : B → R is a Lipschitz function with Lipschitz constant K, there is an extensionf of f to D such thatf is also a Lipschitz function with the same Lipschitz constant K which are defined for all b ∈ D and equal to f if b ∈ B. We will use as extension formula for the application of our structure an interpolation of these two extreme situations.

Index spaces
The object of our model is a metric space (D, d) and an index I. Such an index is basically a Lipschitz real function and in our model represents a "meaningful quantity"for the decision maker that is defining the model-that allows to construct a ranking on D by ordering the values of I(a) for all a ∈ D. We will call a triplet (D, d, I) an index space. Throughout the paper, we will assume that the metric is bounded, that is, Under this assumption, we will say that the couple (D, d) is an indexable space. The control of I using the metric d is the main idea of our model, which assumes that I is in some sense compatible with d, that is, it represents a quantity whose properties are implicitly represented by d. This is the reason why we assume that I is a Lipschitz function. Also, for mathematical reasons and in order to give a better structure to work with, we will impose some normalization and coherency conditions for the index I with regard to the distance d. Basically, we require that there is some proportion among the index and the distance that can be established in terms of two control inequalities. The first definition concerns the control on the size of the indices.
The constant B(I) := sup a∈D |I(a)| will be called the boundedness constant of I. An index will be said to be bounded if it is C-bounded for some C > 0.
For further comparison between several indexes, we will impose the following normalization property for a given constant Q that could allow to control the relation of d with the index I. As we will see, a complementary control will be given by the Lipschitz inequality for the index and the metric.
be an indexable space. We will say that an index for all a, b ∈ D.
We will say that the positive number N (I) is the normalization constant of I if the infimum of the constants Q satisfying the property above is equal to N (I). We will write N (I) < ∞ for denoting that there exists such a normalization constant for I. Note that if Obviously, the definition above can be rewritten without the absolute value in case that the index is positive. However, although we are dealing with positive indices in most of the cases, in principle, we cannot assume that every suitable extension of a positive index is positive. Since these extensions are essential in our formalism, we prefer to write the normalization condition in this form. Note also that, since we have that the new index Abs(I) given by Abs(I)(·) := |I(·)| is also Lipschitz if I is, and for its constant, we have that Lip(Abs(I)) Lip(I).
Remark 1. Notice that the hypothesis that N (I) < ∞ -that is, I is normalized for some K > 0-, imply that I can be zero only at one point. Indeed, if we have that I(a 0 ) = This will mean in our formalism that there is only one "optimal" element in the space, in the sense that the value of any index is allowed to be 0 only in one point. The extension of the results for having several optimal elements would need to change metrics by pseudometrics.
Lipschitz inequality for the constant K. That is, We will say that C(I) is the coherence constant of I if the infimum of all constants K satisfying this property is equal to C(I), that is, C(I) is the Lipschitz constant of I. We will write C(I) < ∞ for denoting that there exists such a coherence constant. Note that sup a,b∈D More obvious relation among the just introduced constants can be seen and will be useful in the next sections. For example, if inf(I) = R ∈ R + , we have that and so what means that every Lipschitz map (that is, C(I) < ∞) acting in an indexable space is always bounded. The set of indices satisfying that inf(I) = 0 will be relevant in the next sections; so we have that all of them are bounded whenever they are K-coherent for any constant K < ∞, and B(I) C(I) · d(D, D).
In case we have that the index has also a finite normalization constant N (I), we get

Basic structure and compactness results for index spaces
Let C > 0 and consider the space F C of uniformly bounded indices defined on an indexable space (D, d), We can define two natural topologies on it. The first one is the uniform topology given by the norm B(·) of the indices as bounded functions and with basic neighborhoods V ε (I 0 ) = {I ∈ F C : B(I 0 − I) < ε}, ε > 0, I 0 ∈ F C . The second one is the topology of the pointwise convergence with basic neighborhoods V ε,a1,...,an (I 0 ) = {I ∈ F C : |I 0 (a i ) − I(a i )| < ε, i = 1, . . . , n} for I 0 ∈ F C , ε > 0, n ∈ N, and a 1 , . . . , a n ∈ D. Proposition 1. The following subspaces of F C are compact with respect to the topology of pointwise convergence: (iii) For K > 0, Q > 0 and R 0, https://www.journals.vu.lt/nonlinear-analysis Proof. (i) First, note that the pointwise limit lim η I η of a net of functions A classical argument identifying each such a function with an element of the Cartesian product Π a∈D [−C, C] (Π a∈D [0, C] for F 0 C ) that are compact since they are products of compact spaces with the product (Hausdorff) topology, gives the result by Tychonoff's theorem.
Kd(a, b) for every η ∈ Λ. So limits of nets belonging to the set written in (ii) gives a function also in this set, what means that it is closed. Together with (i), this gives the result.
(iii) Again, for a fixed pair a, b ∈ D, we have d(a, b) Q(lim η I η (a) + lim η I η (b)), and so the set is closed in a compact set.
This basic compactness results for meaningful subsets of indices opens the door for a basic approximation tool that will be improved in the next sections by considering sequences and particular values of the constants appearing in the subsets in Proposition 1. The natural approximation that we can expect regarding subsets of indices is clearly related to the pointwise topology: given any net (I η ) η∈∆ , there is a subnet (I η0 ) η0∈∆0 and an index I 0 in the subset such that lim η0 I η0 = I 0 with respect to the topology of pointwise convergence, that is, for every a ∈ D, lim η0 I η0 (a) = I 0 (a). Moreover, if we know in advance that we have a pointwise Cauchy net (I η ) η∈∆ belonging to any of the subsets in Proposition 1, we have that its pointwise limit I 0 always defines an index belonging to the set, lim η I η (a) = I 0 (a), a ∈ D.

Standard indices and representation of general indices
In case we do not have a distinguished index in the model (D, d, I), those requirements (Q-normalization and K-coherence) will give us at least some control about how far the index I is of the natural behavior of the metric d for the elements of D. However, the very structure of the model (D, d) provides standard indices that are associated with individual points a ∈ D and which we denote by I a . It can be defined as follows after choosing a reference point a ∈ D. Tipically, a is understood to be the element(s) having the "minimum value" of a given property, but it can be chosen to be any element of D. We define a (the) standard index (associated to a specific element a ∈ D) as I a (b) := d(a, b), where b ∈ D. Next proposition explains why an index defined in this fashion can be considered as "standard". Proposition 2. A standard index I a has both the normalization and the coherence constants equal to 1.
Proof. Note first that d(b, c) d(b, a)+d(a, c) = I a (b)+I a (c), and so the normalization constant Q 1. On the other hand, taking b = a, we get d(a, c) = d(a, a) + d(a, c) = I a (a)+I a (c), and so Q 1. Therefore, Q = 1, and I a is 1-normalized. For the coherence constant, it is clear by the triangle inequality of d that a) = d(c, a), and so 1 K, and so K = 1.
The following corollary states the certainty that, given an indexable space and a point a in it, it is always possible to construct a standard indexed space with an index centered on this point a. Proof. Just take I := I a and apply Proposition 2.
A sort of converse of this result is also true as we show in Proposition 3. It gives a characterization of those indices that can be identified with standard indices. In the rest of this section, we analyze the structure of the spaces of indices and the approximation properties that can be obtained using the metric subspace of the standard indices. Fix an indexable space (D, d). We will give a description of the closure of this space with respect to the topology of pointwise convergence. The idea is to show that, under some requirements, every index in the space can be approximated by (translations of) standard indices. Thus, the natural extension of the class of standard indices is given by considering its closure. Also, the condition min b∈D I a (b) = 0 -that is trivially satisfied by standard indices-can be adapted for getting a more useful space having better topological properties regarding completion. Let us write inf(I) for inf a∈D I(a).
Definition 4. Take a sequence (a n ) in D. Let us say that it is pointwise Cauchy if for every b ∈ D, the limit lim n d(a n , b) of the sequence of real numbers (d(a n , b)) exists.
If the sequence (a n ) is convergent with respect to the metric d, then it is trivially pointwise Cauchy. The restriction of the real line with the Euclidean metric to the interval D = (0, 1] and the sequence (1/n) ⊂ D gives a trivial example of such a (nonconvergent) pointwise Cauchy sequence.
The following theorem is the main result of this section. It is a general version of Proposition 3 and provides a complete characterization of those indices that can be approximated by a translation of standard indices. As the reader may notice in the definition of R C below, many of the indices we are interested in -that is, those indices that occur in the applications we propose, and in general, in all practical situations in which indices appear-satisfy the requirement of belonging to such a set. In the case that the requirements of the inequalities must be relaxed to consider a given index I, one could use instead Proposition 4. Then for every I ∈ R C , there is a pointwise Cauchy sequence (a n ) such that for every b ∈ D, I(b) = inf(I) + lim n d(a n , b).
Proof. Consider b ∈ D. Fix n ∈ N and take an element a n such that I(a n ) − 1/n inf(I). Then inf(I) + d(a n , b) I(a n ) + I(b) − inf(I) On the other hand, and so Consequently, lim n d(a n , b) = I(b) − inf(I) ∈ R for every b, and so (a n ) is pointwise Cauchy. Also, this gives the desired representation I(b) = inf(I) + lim n d(a n , b), b ∈ D.
Remark 2. The converse of Theorem 1 is also true. Indeed, we have that if I(a) = inf(I) + lim n (a n , a) for a certain pointwise Cauchy sequence (a n ) and a, b ∈ D, 2 inf(I) + d(a, b) inf(I) + d(a n , a) + inf(I) + d(a n , b), Thus, we have a characterization of those indices that can be represented as a constant plus a standard index defined by the metric d. For example, we have that the indices that have normalization and coherence constants equal to one (N (I) = C(I) = 1) and inf(I) = 0 are exactly the ones with a representation as I(·) = lim n d(a n , ·) for a pointwise Cauchy sequence (a n ). Moreover, by Proposition 1(iii) we have that the closure of this set with respect to the topology of pointwise convergence is compact since it is included in a (many) set(s) as the one(s) defined there.

Remark 3.
More concrete results can be given for the case that the indexable space (D, d) is compact. Indeed, in this case, we have that for every sequence (a n ), there is a subsequence (a n k ) that converges with respect to d to an element a 0 ∈ D. Thus, if (a n ) is Cauchy with respect to the pointwise topology, we have that lim n d(a n , b) exists, and so it coincides with the limit of the convergent subsequence lim k d(a n k , b) = d(lim k a n k , b). Therefore, if I(b) = lim n d(a n , b) we have that I(b) = d(a 0 , b) for all b ∈ D. Also inf(I) = min b∈D I(b) = d(a 0 , a 0 ) = 0, and so the indices considered in the above results are given by a formula as I(·) = R + d(a 0 , ·) for R 0. Consequently, in this case the limit of indices defined in this way as limits of indices with infimum equal to R have also infimum equal to R, and the sets considered above are compact.
We are assuming in the results above that we have a good control on N (I) and C(I) for which we suppose that they are equal to one. However, this is not always the case in the applications we propose at the end of the present paper. To finish this section, we show that it is still possible to get some control on the general indices having finite normalization and coherence constants by means of standard indices even in the case that these constants are different from one. We present these bounds in the next proposition. Note that for a general index, we can assume w.l.o.g. that either the coherence or the normalization constant is equal to one; in other case, just divide by one of these constants the metric to obtain an equivalent metric with exactly the same properties that the original one, and note that the corresponding constant is now equal to one. Proof. Take ε > 0 and an element a ε ∈ D such that I(a ε ) inf(I) + ε. By the Lipschitz character of I and using that the corresponding constant is equal to 1, we directly get for all b ∈ D. Note that the conditions on the statement of the result give that ∆ ε = (1 + K)(inf(I) + ε) − R is greater or equal to 0. (i) and (ii) are easy consequences of the obtained inequalities and the existence of the minimum of I.
The reader can also notice that some other results in the direction of Proposition 4 are also possible and easy to prove using the arguments of this section. For example, assuming that the indexable space (D, d) is compact, d(a ε , ·) could be changed by a formula as lim n d(a n , ·) for a pointwise Cauchy sequence (a n ) in the results above, and so using compactness, by a formula of the type d(a 0 , ·) for a certain a 0 ∈ D.

Normalization and coherence constants
As we explained in the introduction, identification of general indexes with (translations of limits of) standard indices is the first tool we propose for modelling certain natural and social systems by means of index spaces. The application we propose in this paper is related to a problem of prospective design: how to extend a given index, which provides information about the state of certain elements of a metric space to the whole space. Let us explain our methodological approach.
(i) The first option we propose is to identify/approximate the given index of the index space that constitutes the model with standard indices. The theoretical tools to do it have been already explained in Section 3. (ii) The second option consists of using classical extension formulas -as the ones of McShane and Whitney-for getting a prospective of the values of an index that is known only in a subspace of the indexable space that models the problem in the context of a classical Lipschitz regression procedure.
In this section, we focus our attention on the explanation of the methodological option (ii). Let us state the problem in clear mathematical terms. Consider a model that is based on an indexable space (D, d) in which an index is (partially) defined. That is, the index I is only defined for the elements of a subset D 0 ⊆ D, and we want to use some methods to find a controlled extension of I to the whole set D. As we have said, we can use two well-known extension formulas, which provide an upper extension (Whitney's formula) and a lower extension (McShane's formula). Broadly speaking, the Whitney formula gives an estimate of I for the values of D \ D 0 composed by higher values than the ones "reasonably expected", and the McShane formula gives an estimate with lower values than expected. It must be said that other (in a sense "better") extension procedures than those provided by these formulas are known today. Lipschitz extension procedures are a recognized theoretical source for the construction of the machine learning methods that are currently being introduced. For example, existence results are known on what is called minimum and absolutely minimizing extension of Lipschitz functions, which ensure that the resulting function has locally the best Lipschitz constants (see [12,14]). The corresponding theory and some well developed applications can be found in [2] and also in [16] for the case of Lipschitz functions on graphs. However, for the purpose of the present work, it is better to use the classical Whitney and McShane formulas since we can easily test for them the variation of the coherence and normalization constants when the indexes are extended. Thus, it is possible to directly compare the extension results with those obtained by characterizing the indexes with standard indexes. This will become clear in Section 5, where both procedures presented above -(i) identification with standard indices, and (ii) index extension-, will be used.
To complete the overview of applications of the extension of Lipschitz functions in machine learning, the reader can find more recent developments in the context of Lipschitz regression and reinforcement learning in [3,7,10] (see also references therein).
Thus, in this section, we demonstrate some results on how the McShane and Whitney extension formulas preserve the main constants that allow to control the approximation of general indexes by standard indexes. From a theoretical construction point of view, this is necessary to exploit the possibility of combining these formulas with the use of standard indexes. As we have already shown, small values of N (I) and C(I) -around 1makes it advisable to use the direct identification of any index I with a standard index for extrapolation, while in case this control is not so good, extension formulas can be used instead. Here we show the quantization of how the control in the extension is being lost as N (I) and C(I) increase.
Although we will have to use the two extension formulas considered, let us show that Whitney equation preserves the normalization and coherence constants, while McShane formula preserves only the coherence constant (i.e., the Lipschitz constant). Convex combinations of such formulas could be used, so this will suffice to provide bounds for N (Î) and C(Î) for the extensionÎ of any index I. This gives at least an indicator of how the extension procedures deteriorate the values of these constants, showing that, although there is some control, it is always better if the method of analysis is based on identification with a standard index, at least theoretically. In this case, as demonstrated in Section 3, the constants N (Î) and C(Î) are always equal to 1. In the development of the application shown in Section 5, we will see that, in fact, both techniques can give comparable results. Consequently, On the other hand, the classical McShane-Whitney theorem gives the preservation of the Lipschitz inequality for the same constant K, and when we use the Whitney extension I W , the normalization constant Q is also preserved.
Note that, in case the requirement 1 Q·K does not hold, we can get also an estimate depending on the value of the constant Q · K just using the inequalities in the proof of Proposition 5. For the McShane extension, we do not obtain the same result, although an estimate of the constant appearing in the Q-normalization property can be also given. In some cases, we could obtain the same than in the Whitney case. https://www.journals.vu.lt/nonlinear-analysis Since these inequalities can be written for any pair a, b ∈ B, we finally get  Consequently, if we assume that this condition holds (that is, there is b ∈ D such that I(b) = 0), we always have that Q · K

Application: Automatic triage in a hospital
Let us show an application concerning control systems in the context of the hospital management. Suppose that we need to give an order in the process of care of an emergency service in a hospital. The idea is to give an adapted criterion based on a previous classification of a group of patients who have already been monitored by the hospital by a team of specialized physicians on a given subset of individuals in the group. To solve this problem, we use the two possible procedures explained in the previous sections. The set of all patients is assumed to be endowed with a metric, which models how similar two patients are in terms of the severity of their disease. Suppose we have a ranking -given by an index-of the level of severity of a group of patients, which come to the hospital, provided by a group of experts. We try to find an index on any other group of patients presenting to the hospital, extrapolating the experts' criteria, so that the resulting extension is as appropriate as possible. The first procedure consists of approximate/identify the original index by what we have called a standard index. That is, we choose a patient -preferably the sickest one-and identify the index for any patient with the distance to her/him. After the results of Section 3, we known that this procedure is as good as the coherence and normalization constants are close to 1. The second option is just to use the McShane-Whitney extension formulas for extrapolating the original values of the index. We can control the adequacy by means of the bounds established for the McShane-Whitney extensions in the previous section taking into account the values for the original index.
We will explain these constructions on a real data set. The data we use to measure the distance between patients is part of the data used in the document [20], which is published on the webpage [19]. We consider the variables "Age", "Main Complaint", "NMC" (Numerical Value for Main Complaint), "NRS pain" (Numeric Rating Scale for pain), "HR" (Heart Rate) and "Saturation" (Oxygen saturation in the blood). The explanation for all of these, except "NMC", is standard. The "Main Complaint" is a descriptive variable that measures the patient's level of complaint with respect to how they feel. Since it is not a numeric character, to include it in the count, a numeric value out of 100 is assigned to each complaint. The highest point, 100, is given to the most critical complaints, such as mental change or respiratory failure. Of course, the same numerical value is given to all patients with the same complaint.
We considered these variables because they describe the situation of a patient upon arrival at the hospital, and therefore have a direct consequence on decision making. We worked with 55 patients for whom all these variables are available in the recorded data. Using these variables, we define a metric matrix calculated using a weighted Euclidean norm that defines the required distance in an indexable space. The formula for the elements of the matrix is  where p, q belong to the set of 55 patients. The decision maker could change the weights in the standard or could use other variables that are considered more efficient in the calculation.
(i) McShane-Whitney extrapolation. For the first construction, the first 11 patients are separated as a test set. There is no special reason to choose exactly 11 patients, we simply prefer to take a test set of few items and extend the indexing process to as large a set as possible to test the efficacy of our procedures. For this reason, we included only 20% of the patients in the test set. Note that there are many missing variable values in the original data set we refer to, so only a small subset is suitable to be included in our calculations.
By using a convex combination of the McShane and the Whitney formulas, we obtain an ordering for the rest 44 patients. The best values of the approximation is obtained by the following convex combination: where p is one of the 55 patients.
(ii) Standard index. For the second construction, we chose the first patient as the reference point since this patient occupies the first place in the triage performed in the hospital. The same metric is used again with one difference: only the distances between the first patient and the others are considered. Let us denote the first patient by p 1 . Then and index formula given by I p1 (p) = d(p 1 , p), where p is each of the 55 patients, can be considered. As noted above, the standard index starts at 0, but the first value in the ordering of a triage is 1. To ensure consistency, we will give the triage ordering by I p1 (p) + 1, thus obtaining one of the canonical types of indexes -a translation of a standard index-of those studied in Section 3.
Some values of the extension of the original triage index, given by both the McShane-Whitney extension and the standard index explained, are presented in Table 1. The triages given by our approximations are decimal numbers, so it is necessary to round to the nearest whole number to give the triage order, although the decimal value can be used to decide between patients for whom the same triage order is obtained. Indeed, a more sensitive triage is given by the decimal numbers. To see what it means, consider the last two patients with the McShane-Whitney extension in the table. The Main Complaints of these patients are the same, and the predicted triages are 1.63 and 1.50. Rounding the predictions, the second order is given to the patients for triage. But 1.63 > 1.50, and this shows that the last patient has priority. This is significant as the last patient is elder, and this is the only main difference between the patients. The same effect is also observed for the standard index. Figure 1 provides a representation for both predicted triages together with the original triage of the experts. 55 patients are represented in the axis OX. Note that, as expected, the approximations obtained by McShane-Whitney extension coincide with the original triage when the patients belong to the test set. The patients in this set are the first 11 points in the axis OX. This criterion is followed in all the figures presented below. To see a comparison of the triages, we give a representation of the graphics in the same coordinate system in Fig. 2.
A representation for the errors of both predicted triages are presented in Fig. 3, and comparison of the errors is shown in Fig. 4.
As the reader can see, both prospective methods seem to be good enough for providing a useful automatic triage tool. Of course, it is better to get the evaluation of the triage number by experts for an small group and to extend it to the rest of the cases than make it necessary to get such a decision for the experts team at every new patient entering the hospital. Only four variables are needed, that are the direct result of rapid physical measures and observation. After the analysis of the figures, we can state three main conclusions: (a) The set of variables that have been chosen is good enough for the description of the triage process: experts should have enough information with these values for doing a good triage: the standard index we have chosen is given by the metric without using any expert's triage for the extension. (b) The expert's triage is also succesfully extended by Lipschitz extrapolation: McShane-Whitney extension gives good results when compared to real triage ordering. (c) We have seen that there is a high compatibility between the distance and the index, so the standard index and the McShane-Whitney extension provide similar results. The respective error distributions are also similar (Figs. 3 and 4). The coincidence of both methods is a symptom of a correct relationship between distance and index, and so the proposed index space provides a strong model. Therefore, index spaces, standard index approximation and Lipschitz extensions on them can be used to model triage processes in a hospital and can provide a basis for a machine learning method for hospital management. The proposed example opens the door to the construction of more sophisticated procedures, where the distance could contain more variables and the training set could be extended.
To finish, let us summarize the main contents of the paper. We have shown an elementary structure for modeling physical and social systems -index spaces-, which are described as metric spaces endowed with numerical properties that can be represented https://www.journals.vu.lt/nonlinear-analysis  as real-valued indices. The main properties of the structure of these models have been presented, as well as some properties of approximation by indices that behave well with respect to the metric -standard indices-.  It has also been shown how to perform Lipschitz extrapolation on these index spaces by showing control formulas on how the extension preserves the good properties of the original model -normalization and coherence constants-. These three components -index spaces, standard indexes and McShane-Whitney extensions-are thus proposed as complementary tools for metric modeling and foresight, providing a complete analytical framework.