Measuring the Directional or Non-directional Distance Between Type-1 and Type-2 Fuzzy Sets With Complex Membership Functions

Fuzzy sets (FSs) may have complex, non-normal, or non-convex membership functions that occur, for example, in the output of a fuzzy logic system or when automatically generating FSs from data. Measuring the distance between such non-standard FSs can be challenging as there is no clear correct method of comparison and only limited research currently exists that systematically compares existing distance measures (DMs) for these FSs. It is useful to know the distance between these sets, which can tell us how much the results of a system change when the inputs differ, or the amount of disagreement between individual's perceptions or opinions on different concepts. In addition, understanding the direction of difference between such FSs further enables us to rank them, learning if one represents a higher output or higher ratings than another. This paper builds on previous functions of measuring directional distance and, for the first time, presents methods of measuring the directional distance between any type-1 and type-2 FSs with both normal/non-normal and convex/non-convex membership functions. In real-world applications, where data-driven, non-convex, non-normal FSs are the norm, the proposed approaches for measuring the distance enables us to systematically reason about the real-world objects captured by the FSs.

establishing if one FS is to the left or right of another.Though some literature on directional DMs (DDMs) already exists [1], [2], current methods do not have the mathematical properties that would be generally desired.
Additionally, difficulties arise when measuring the distance between non-normal or non-convex FSs.For example, Fig. 1 shows a unimodal and a bimodal FS representing the aggregated subjective opinions on two variables.The bimodal function is non-convex as people's beliefs have fallen into two distinct groups.It is also non-normal (with a highest degree of membership less than one) as neither group is certainly correct.To measure the distance between these two sets, a series of horizontal cuts (α-cuts) are commonly compared.However, in some cases, (e.g., α 1 in Fig. 1) the bimodal set results in a noncontinuous interval (effectively, a set of two intervals), and in other cases (e.g., α 2 ) the cut results in the empty set.This paper examines measuring the distance in such complex cases.Some research has been published onto the distance between type-1 (T1) FSs that are non-normal [2], [3] or non-convex [2], but these measures are either non-directional [3] or lack the expected properties of a DM [2].There is also limited literature on the α-cut-based distance between interval T2 (IT2) FSs [4], but this does not account for direction, non-normality, or non-convexity in the membership functions.Additionally, to the authors' knowledge, there are currently no α-cut-based DMs to compare general T2 (GT2) FSs.Note that it is important to use α-cuts as they enable a comparison of FSs along the x-axis.
This paper is based upon existing measures [1], [2], [4], developing a DM for T1 FSs that can measure the directional or non-directional distance between FSs that may be non-normal or non-convex; proofs of the resulting measure's properties are presented.The approach is then extended to enable the comparison of T2 FSs.The functions proposed in this paper are available online as part of our toolkit at https://lucidresearch.org/software and at https://bitbucket.org/JosieMcCulloch/fuzzycreator.
Note that in order to determine the distance between FSs, the ordering along the x-axis must be taken into account [5].Therefore, an α-cut -based approach is the most appropriate.Any measure that accounts for vertical slices only (such as in [6]) is more akin to measuring dissimilarity.However, distance by dissimilarity is a fundamentally different measure with different properties that calculates the difference in overlap between FSs.In this paper, we measure the distance between FSs in relation to their universe of discourse; this is measured through α-cuts.
Furthermore, note that in principle, any measure (including any DM) on a set may be designed to itself return an output of the same type of set.For example, a DM on T1 FSs would return a T1 FS distance.Such a DM is, for example, discussed in [7].It is clear that returning a set of the same type as the input sets minimizes the potential for information loss.However, most commonly, measures on FSs are designed to return crisp outputs for use in decision making and similar applications.This paper, thus, focuses specifically on developing (distance) measures returning a crisp output for convex/non-convex, normal/nonnormal T1 and T2 FSs.
It is important to note, however, that a crisp distance value will, of course, capture minimal information about the input FSs.For example, it will not be possible to know from the value of the distance if the FSs compared were non-normal or nonconvex.In a future publication, we are looking to revisit some of the contributions made in this paper in respect to more complex (distance) measures that return non-numeric distances, such as proposed in [7].
This paper is structured as follows.Section II presents background on FSs and existing DMs.Section III presents a DDM for T1 FSs that may be non-convex or non-normal.Then, Sections IV and V extend the measure to compare interval and GT2 FSs, respectively.Finally, conclusions are presented in Section VII.

II. BACKGROUND
This section presents background on FSs and the key methods for measuring their distance.For reference, Table I provides descriptions of set notations and functions used throughout the paper.

A. Fuzzy Sets
This section presents the necessary background on FS theory and notations for T1 and T2 FSs.
1) Type-1 FSs: Definition 1: Let T 1(X) denote the set of all FSs in the universe of discourse X.The FS A ∈ T 1(X) is defined by a set of pairs as where μ A (x) ∈ [0, 1] denotes the membership value of x in A.

Definition 2:
The height H A of an FS A is its maximum membership value, defined as max x∈X μ A (x).
An FS that does not satisfy (2) is non-convex.Definition 5: An α-cut of a convex normal FS A ∈ T 1(X) is written as [9] Note that A denotes an interval and A denotes a T1 FS.Any α-cuts of A above H A will be empty sets.
The α-cut of a normal, convex FS can be represented as a continuous interval.Thus, an α-cut may be rewritten as However, this representation changes when FSs are non-convex or non-normal.
The α-cut of a non-convex region within a non-convex FS cannot be described as a continuous interval [as in (4)].Instead, it is described by a set of non-overlapping, continuous intervals.This is defined as a noncontinuous interval as follows.

Definition 6: Let a noncontinuous interval
where H i represents the ith continuous interval within −− H and I is the total number of intervals within −− H .Such noncontinuous intervals arise, for example, when describing the α-cut of a non-convex FS.For example, referring to Fig. 1, [5.376, 8.625]}.
2) Type-2 FSs: A T2 FS is an extension of a T1 FS in which the membership value of any element is defined as a T1 FS instead of a crisp number.
Definition 7: Let T 2(X) represent the set of all T2 FSs within X, then the FS Ã ∈ T 2(X) is formally written in terms of a set of pairs as [11] where x is the primary variable in X, u ∈ [0, 1] is the secondary variable, and the amplitude of μ A (x, u) ∈ [0, 1] is known as the secondary grade.
In addition to (6), many representations of T2 FSs have been developed.This paper uses the zSlices [12] (aka, alpha-plane [13]) representation (introduced in Section II-A4).This is based on the theory of IT2 FSs, introduced next.
3) Interval Type-2 FSs: An IT2 FS is a special case of T2 in which each secondary membership value greater than 0 has a membership of 1.
Definition 8: Let IT 2(X) represent the set of all IT2 FSs within X.The FS Ã ∈ IT 2(X) is formally written as [14] where μ Ã (x) and μ Ã (x) are defined as the lower and upper membership values of Ã.The lower and upper membership functions (UMFs) of Ã are Definition 9: The α-cut of an IT2 FS may be represented by the α-cuts of the upper and lower membership functions (LMFs); throughout this paper, this is denoted Ãα = { ÃL α , ÃU α } for Ã ∈ IT 2(X) where ÃL α and ÃU α are the α-cuts of the lower and UMFs of Ã, respectively.
4) zSlices T2 FSs: A zSlices T2 FS can be composed by slicing a T2 FS along the z-axis, segmenting the FS into many IT2 set-like FSs called zSlices.Each resulting zSlice has a secondary membership of z i , referred to as the zLevel.
Definition 11: As a zSlices T2 FS Ã ∈ T 2(X) is a collection of IT2 FSs, we represent the α-cuts of Ã as the collection of α-cuts of its zSlices as given in Definition 9).That is, Ãz i α = { Ãz i L α , Ãz i U α }; i.e., the α-cut of Ãz i is composed of the α-cuts of the lower and UMFs of Ãz i .
Definition 12: Z Ã denotes the set of all zLevels of the zSlices in Ã.This is defined as where I is the total number of zLevels in Ã.

B. Distance Measures
A DM is a function d : A × B → R + or R for non-directional and directional distance, respectively, where A and B are crisp sets, or T1 or T2 FSs.This section covers background on nondirectional and DDMs.
1) Non-directional Distance: Some common properties of a non-DDM include the following.a) Self identity: Note that, as mentioned in Section I, we only focus on measures of distance that calculate the difference between FSs in the x-axis by measuring α-cuts.
Note that d T 1 (12) does not measure where α = 0 as this relates to all elements that are not within the FS.
In this paper, d refers to the set of distance functions to compare two intervals, and d refers to a specific distance function, as follows.
Often, the distance between two intervals is some form of the Minkowski [1], [4], [16], [17] or Hausdorff distance [3], [15].The Minkowski distance dr between two intervals Ā and B is where r > 1 and [ ĀL , ĀR ] represents a continuous interval; e.g., the α-cut of an FS A ∈ T 1(X).The Hausdorff distance dh between two intervals Ā and B is [5] To compare non-normal FSs, McCulloch et al. [2] and Chaudhuri and Rosenfeld [3] present methods based on the Hausdorff distance, where [2] also measures distance on non-convex FSs.Extensions using the Minkowski distance are not currently in the literature.These are further developed in Section III.
To compare IT2 FSs, Figueroa-García et al. [4] developed a DM using the Minkowski distance (where r = 1) to compare α-cuts of the upper and LMFs.The distance between two IT2 FSs Ã, B ∈ IT 2(X) is given as (12), where f (α) = α and df is used for d, given as [4] where Note that (15) requires the membership functions of Ã and B to be convex and normal.However, df could also be used to compare convex, non-normal IT2 FSs with identical heights.
In addition to (15), Figueroa-García et al. [4] also proposed two methods based on comparing the centroids of FSs; for more details on this see [4].
Note that, to the authors' knowledge, there are no current α-cut based measures of distance beyond IT2 to GT2 FSs.
2) Directional Distance Measures: A DDM is the one that does not follow separability and instead uses a signed result to indicate direction; thus, giving a result within R instead of R + .A DDM has the benefit of indicating if one FS contains lower or higher values from the universe of discourse than another FS.This is useful in applications requiring ranking of FSs, in which ordering is important.
The property of symmetry of a DDM is altered to d(A, B) = −d(B, A) [1].Some properties of directional distance are presented in [1] and will be further explored in this paper in Section III-A.
Additionally, as a result, (17) does not always follow transitivity or triangle inequality.This concludes the background of DMs in the literature.The next section expands upon these current measures to introduce a DDM for T1 FSs that may be non-normal or non-convex.

III. DIRECTIONAL DISTANCE FOR NORMAL, CONVEX, T1 FSS
This section uses a hybrid of preexisting measures to propose a new DDM on non-normal and non-convex FSs.The theory of measuring distance for non-normal and non-convex FSs is based on [2].However, as described with (17), this existing work cannot be applied when comparing α-cuts with identical centres but different lengths.This is due to a limitation of using the Hausdorff distance to describe direction.Additionally, the directional Hausdorff distance does not have the property of triangle inequality, which may make it unsuitable for many applications.As an alternative, the Manhattan-based directional distance proposed by Yao and Wu [1] is used.Using a hybrid of these methods ensures the resulting DDM has predictable properties that are consistent with non-directional measures.
This section first discusses the properties of ( 16) [1], after which the measure is extended for non-convex or non-normal FSs.

A. Properties of Directional Distance
Due to the directional nature of dy (16), the standard properties of a DM are slightly altered.Some of these properties are discussed within [1] and this section explores additional properties in more detail.
1) Self-Identity: If two FSs are identical, then their distance is zero, as is standard with the non-directional form of the Manhattan distance.However, this is not the only case in which the distance may be zero.
For two intervals Ā and B, if one interval is a subset of the other and the distances ( ĀL − BL ) and −( ĀR − BR ) are equal, then their directional distance is zero.We shall denote this as property reflectivity.
Definition 13 (Reflectivity): The distance between two intervals is 0 if the distances between their respective end points are equal to each other and in opposite directions.
For example, in Fig. 2, Ā    This property enables us to indicate both the magnitude of the distance (by the absolute value) and the direction of distance (by the sign).Note this property also appears in [1].
Theorem 3: dy (16) follows partial-symmetry. Proof: 3) Separability: The property of separability no longer holds as any real negative or nonnegative value may result from measure.Instead, we define a new form of separability denoted as directional-separability.
Definition 15 (Directional-Separability): The sign of the distance indicates the relative positions between the variables For directional-separability, we must define when Ā < B. Several methods of interval order have been proposed in the literature [20], of which we choose some of the following common methods: Ā < B ⇔: 1) ĀR < BL ; 2) ĀL < BL and ĀR < BR ; 3) ĀM < BM and ĀW < BW ; 4) ĀM < BM and ĀL < BL ; 5) ĀM < BM and ĀR < BR ; where ĀM = ( ĀL + ĀR )/2 and ĀW = ĀR − ĀL .We reduce the last three methods to ĀM < BM ⇒ Ā < B and show that this is sufficient to prove directional-separability for these three definitions of interval ordering.
In each case, the likewise is given for dy ( Ā, B) are true.However, for the directional distance, it is necessary to consider the ordering of the FSs when applying the rule of triangle inequality.This can be explained with the aid of Table II.If the first input of part 1 appears as the first input where it occurs in part 2, then the distance is unchanged.Otherwise, the negative of the result must be used.Likewise, if the second input of part 1 appears as the second input where it occurs in part 2, then the sign is kept the same.Otherwise, the negative of the result is used.
Note that the restricted triangle inequality is not affected by the ordering of the FSs, i.e., dy ( Ā, C) ≤ dy ( Ā, B) + dy ( B, C) Given that B ≤ C it follows that dy ( Ā, B) ≥ dy ( Ā, C).
The remainder of this section presents methods of measuring the distance between T1 FSs that may have non-convex or nonnormal membership functions.The methods proposed enable one to measure either the directional or non-directional distance between such sets.

B. Non-Convex FSs
To measure the distance (directional or non-directional) between non-convex FSs, a method of comparing noncontinuous intervals is required.For example, referring to Fig. 1, at α 1 , the FS in Fig. 1(a) results in a continuous interval.However, in Fig. 1(b), it is represented by a noncontinuous interval because the FS is non-convex.
Definition 16 (Distance Between Noncontinuous Intervals): As described in [2], the directional distance between α-cuts that may be noncontinuous is calculated as where A α i represents the ith continuous interval within In (18), we take the average distance between discontinuous intervals, but a weighted average can implemented if, for example, close regions of FSs are more important than far regions.
The function d may be ( 16) for directional distance, and dnc Consider three α-cuts, where A α = [2, 4], B α = ( [3,5], [7,9]), and C α = [5, 7] (A α and C α are convex and B α is non-convex).Using (18) , d(A α , B α ) = d(A α , C α ); the distance is the same even though the α-cuts are fundamentally different.While this may not be desired, it will always be an issue when simplifying the distance of FSs to a singleton.If it is necessary to show non-convexity in the distance when it is present in the FSs that are compared, we recommend modeling distance as an FS [7].
When distance must be represented as a singleton, we recommend the proposed method (18) for measuring non-convex FSs.Although the most accurate result is achieved by representing distance as an FS, a singleton result is usually required in most applications.The defuzzified result of the distance represented by an FS provides an appropriate singleton approximation.Our proposed measure provides the centroid of the fuzzy distance.For example, Fig. 3 shows two FSs and their distance as an FS (using [7]) and as a singleton [using (18)].Note that the singleton result is the centroid of the fuzzy result.This example shows that the proposed method provides a good singleton approximation of the distance between non-convex FSs.(Note that the methods in [7] only provide fuzzy-valued distance for T1 FSs not for T2).

C. Non-Normal FSs
For two FSs A and B, if H A = H B (such as for normal FSs), then only parallel α-cuts should be compared, i.e., we should not measure d(A α i , B α j ) where i = j.If we do, then d(A, B) = 0 when A = B because α-cuts of an FS are usually different at different α levels.Next, consider A and B where H A < H B < 1.There exist α-cuts where A α = ∅ and B α = ∅ (where H A < α ≤ H B ) and α-cuts where A α = B α = ∅ (where α > H B ).However, if we only measure parallel α-cuts , then we ignore B where We propose measuring d(A H A , B α ), where H A < α ≤ H B so that a full comparison of the FSs can be made (comparing α-cuts in B with the highest possible cut in A).Instead of weighting this distance with f (α) = α, as is done in (12), we weight the distance at these α-cuts as H A .This is chosen because A does not have values with membership greater than H A and therefore the distance d(A H A , B α ) cannot be any more confident than H A .We also propose that the distance where α > max{H A , H B } is not measured since both FSs are empty at these α-cuts.
Considering the above-mentioned conditions, the distance between A and B is measured as To compare FSs that are both non-normal and non-convex, 18).We propose (19) (for normal and non-convex FSs) as an alternative to (12) (for normal, convex FSs).
Theorem 6: d T 1 has the properties self-identity, symmetry, separability, triangle inequality, and transitivity when used with a non-DDM for two intervals.
Proof: For self-identity, symmetry, and separability, the proofs are trivial.
Triangle Inequality and Transitivity: As the measure is a weighted average for each used value of α, increasing or decreasing the number of α-cuts compared does not increase or decrease the calculated distance according to d T 1 .Thus, the properties are retained.
Theorem 7: d T 1 has the properties self-identity, partialsymmetry, and directional-separability when used with a DDM for two intervals.
Proof: The proofs are trivial.This concludes the introduction of a new DDM on T1 FSs.This improves upon the existing DDMs [1], [2] by enabling the comparison of non-normal and non-convex FSs whilst maintaining the expected properties of a DDM, as described in Section III-A.The next section extends this measure to IT2 FSs.

IV. DISTANCE ON IT2 FSS
A T1 FS can be modeled as an IT2 FS where μ(x) = μ(x) ∀x ∈ X.Based on this, we would expect the distance between T1 FSs using an IT2 representation and IT2 DM to be equal to their distance using the T1 representation and measure.This ensures that the results of T1 and T2 measures can be easily compared because the type of FS does not affect the interpretation of the results.
We measure the distance between IT2 FSs Ã and B by comparing their UMFs and their LMFs and aggregating the two results.We do this based on the method of comparing T1 FSs.As the upper and LMFs of IT2 FSs are T1 FSs, let A be a T1 embedded set of Ã and let the distance between two embedded membership functions (MFs) (UMFs or LMFs) of Ã, B ∈ IT 2(X) be where γ = max {H A , H B } and f (α) = min{H A , H B , α}.Note that at this stage (20), the average distance across α-cuts is not normalized the same as for T1 FSs (19).Next, we aggregate the distance between upper and lower MFs and normalize the distance together.Definition 17 (Interval Type-2 DM): The directional distance between two FSs Ã, B ∈ IT 2(X) may be measured by comparing the upper and LMFs as where The function d I T 2 (21) enables the comparison of non-normal IT2 FSs.In addition, depending on the choice of interval distance for d within d I T 2 LU (20), it is possible to compare non-convex FSs and the result may be either directional or non-directional.
Theorem 8: d I T 2 has the properties self-identity, symmetry, separability, triangle inequality, and transitivity when used with a non-DDM for two intervals.
Proof: The proofs are trivial.Theorem 9: d I T 2 has the properties self-identity, partialsymmetry, and directional-separability when used with a DDM for two intervals.
Proof: The proofs are trivial.

V. DISTANCE ON T2 FSS
A DM on T2 FSs is attained by using the IT2 DM d I T 2 on the zSlices of the FSs at relative zlevels and aggregating the results.This is a method that has previously been applied to extend IT2 similarity measures to T2 FSs [21]- [24].
We propose measuring the distance between zSlices based FSs by only comparing zSlices at equal zLevels where possible.However, it is possible for T2 FSs to have non-normal membership functions within the secondary membership axis.This may occur, for example, when there is no consensus when modeling agreement between individuals.Fig. 4 shows an example of an FS that has non-normal secondary membership functions ( Ã) and an FS that is normal ( B).
To compare such sets as those in Fig. 4, we take the same approach as for non-normal T1 FSs.The distance between zSlices is measured at equal zLevels where both FSs are nonempty at the given zLevel.At zLevels where one FS Ãz is empty and another Bz is not, the highest nonempty zLevel of Ã is measured against Bz .At zLevels where both FSs are empty, distance is not measured.
We use L( Ã, B) to denote the maximum zLevel that can be used to compare Ã and B.
Definition 18: where Z Ã is described in (11).Definition 19: The distance between two T2 FSs Ã, B ∈ GT 2(X) may be measured as where d I T 2 is the DM on IT2 FSs (21) and L( Ã, B) is given in (22).Using L( Ã, B) ensures that all zSlices up to the lowest maximum zLevel, even if the FSs are divided into different zLevels [22].Note that d T 2 inherits the properties of d I T 2 , including the ability to measure either directional or non-directional distance.
Theorem 10: d GT 2 has the properties self-identity, symmetry, separability, triangle inequality, and transitivity when used with a non-DDM for two intervals.
Proof: For self-identity, symmetry, and separability, the proofs are trivial.Triangle Inequality and Transitivity: As the measure is a weighted average for each used value of z, increasing or decreasing the number of zLevels compared does not increase or decrease the calculated distance according to d GT 2 .Thus, the properties are retained.
Theorem 11: d GT 2 has the properties self-identity, partialsymmetry, and directional-separability when used with a DDM for two intervals.
Proof: The proofs are trivial.This concludes the proposed methods of measuring directional and non-directional distance on T1 and T2 FSs that may have non-normal or non-convex primary membership functions and, for T2 FSs, non-normal secondary membership functions.Note that although non-convex secondary membership functions are possible, they are uncommon due to their complexity and are not considered further in this paper.Furthermore, we note that (23) enables the direct comparison on T2 (interval and general) as well as T1 FSs.

VI. NUMERICAL EXAMPLES
This section demonstrates the proposed DDMs on T1, IT2, and GT2 FSs.Each example includes the following three FSs.

A. Type-1 FSs
The FSs are defined by key values (A, B, and C) mentioned below and linear interpolation is used to calculate intermediary membership values.
Fig. 5 illustrates the FSs.The α-cuts are given in Table III.The distance between the FSs at each α-cut and overall are given in Table IV.As A and C are symmetrical FSs, their distance is equivalent to comparing their centres of gravity.Note the symmetry in distance such that d(A, C) = −d(C, A).
Comparing B with C, their distance is larger at higher α-cuts, particularly at α = 0.75 where the right-most region of the nonconvex FS B is not present.Lower α-cuts of B are closer to C, to the extent of overlapping; this is reflected in the calculated distance that is smaller at lower α-cuts.The distance between A and B decreases at lower α-cuts as B begins to overlap A.
(25) Fig. 6 illustrates the FSs.The α-cuts are given in Table V.
The same trend in results can be found in the IT2 results as in the T1 results (see Table IV).Specifically, d(A, C) is consistent throughout all α-cuts, d(B, C) decreases at lower α-cuts, and d(A, B) increases at lower α-cuts .The reasons are the same as discussed for Table IV.

C. General Type-2 FSs
In this example, we construct a GT2 FS with two zSlices.The lowest zSlice z 1 with a secondary membership (zLevel) of 0.5 is defined by the IT2 FSs, as given in (25), and has the same corresponding α-cuts , as given in Table V.The highest zSlice z 2 with a secondary membership of 1.0 is defined by the T1 FS, as given in (24), and α-cuts , given in Table III.(24) AND (24) The distance between the FSs is calculated through the weighted average of the distances at z 1 and at z 2 with weights 0.5 and 1.0, respectively.The resulting distance at each zSlice and overall distance are given in Table VII.Note that the distances at z 1 and z 2 are the same as those for the IT2 and T1 FSs, as given in Tables IV and VI, respectively.The trend in results for GT2 FSs given in Table VII are the same as those discussed for the T1 results (see Table IV).
Next, we demonstrate comparing GT2 FSs with non-normal secondary membership functions.As in the previous example, the lowest zSlice z 1 (at zLevel 0.5) is defined by the IT2 FSs given in (25).However, in this example, set Ã is only described by this single zSlice.Therefore, the set of zLevels of Ã is Z Ã = {0.5}.As in the previous example, B and C have a second zSlice z 2 (at zLevel 1.0) with the same membership functions as the T1 FSs B and C described in (24).
Table VIII shows results of comparing these FSs using d GT 2 (23).Note that L( Ã, B) = {0.5},L( Ã, C) = {0.5},and L( B, C) = {0.5, 1.0}.Therefore, in each case except d GT 2 ( B, C), the distance at only one zLevel can be compared.Next, we present an example of the behavior of measuring distance with non-convex T2 FSs.Fig. 7 shows a convex T2 FS ( Ã) and two identically shaped non-convex T2 FSs ( B and C).The modes of B are at x = 4 and x = 5, and the FS is centred at x = 4.5.The FS C is the same but shifted by 2 along the x-axis; that is, its centre is at x = 6.5.Using our proposed measure, d T 2 ( Ã, B) = 2.5 and d T 2 ( Ã, C) = 4.5.These results demonstrate that the proposed measure correctly shows the difference in position of B and C with respect to Ã and correctly identifies the centres of the FSs.While this result contains limited information in the sense that, being numeric, it does not show the non-convexity in the result (for instance, as would be possible when returning an FS valued distance), it provides a useful single-valued measure of distance.As shown in Fig. 3, an FS result could convey the non-convexity of the T2 FSs, but loss of such information is unavoidable when reducing a result from its FS form to a numeric (singleton) form.

VII. CONCLUSION
DMs are vital in applications centring on employing human perceptions, preferences, and habits.They provide the ability to understand the relative difference between FSs with respect to their universe of discourse.DDMs are especially useful in understanding the direction of the difference between such FSs, for example, in ranking, to determine if one FS represents a higher output or higher ratings than another.
Current methods in the literature enable the directional or non-directional distance between T1 FSs.However, although some steps have been made towards comparing non-normal and non-convex FSs, the measures do not have all of the properties of a DM, making them difficult to apply.In addition, current DMs on T2 FSs only exist for IT2 FSs that are normal and convex.Thus, current methods in the literature are not useful in cases where non-normal and non-convex FSs are common, such as applications with data-driven FSs, for which any measures used on these FSs need be able to handle such circumstances.
Given this, we present extensions to DMs with the goal of enabling the comparison of different types of real-world FSs.We introduce a new measure on the directional and non-directional distance for T1 and T2 FSs that may be normal/non-normal and convex/non-convex.Note that for T2 FSs, the extensions in this paper support non-normal secondary MFs, but do not support non-convex secondary MFs.(This will be addressed in a future publication).
In addition, the measures resulting from the proposed approach are "backwards compatible" in the sense that they allow for the direct comparison of GT2 to IT2 and T1 FSs-regardless of the sets' (non)convexity, (non)normality, and type.As nonstandard (e.g., non-convex) FSs are common in real-world applications where FSs are data driven, the proposed extensions, thus, significantly expand the applicability of FSs (including T2 FSs) to applications beyond fuzzy logic, e.g., distance-based recommendation systems, as used commonly in marketing.
The functions proposed in this paper are available online as part of our toolkit, available at https://lucidresearch.org/software and at https://bitbucket.org/JosieMcCulloch/fuzzycreator.
n and m are the total number of continuous intervals within −− A α and −− B α , respectively.The function d denotes the set of DDMs on intervals.

r ( 13 )
and dnc h(14) for non-directional distance.In each case, −− d inherits the properties of the chosen method for d. compares the distance (using a function from d) of every continuous interval within one continuous interval (i.e., they are convex), then only one comparison is made.Note that−− d can compare noncontinuous intervals (from nonconvex FSs) but cannot be used to compare empty intervals (from non-normal FSs).

Fig. 3 .
Fig. 3. (a) Non-Convex FS and a convex FS.(b) Distance between these FSs as an FS (orange) and as a singleton using (18) (black dashed).

TABLE I TABLE OF NOTATIONS
Common FS notations are omitted.Note that the acronym DM denotes distance measure, DDM denotes directional DM, UMF denotes upper membership function, and LMF denotes lower membership function.

TABLE II EXAMPLE
OF THE RESTRICTED PROPERTY OF TRIANGLE INEQUALITY ON THE DDM dy (16)

TABLE V α
-CUTS OF FSS IN (25) AND FIG.6

TABLE VI DISTANCE
BETWEEN IT2 FSS IN (25) AND FIG. 6 AT INDIVIDUAL α-CUTS (FOR LOWER AND UMFS, RESPECTIVELY) AND OVERALL

TABLE VII DISTANCE
BETWEEN GT2 FSS IN FIG. 6 BASED ON

TABLE VIII DISTANCE
BETWEEN GT2 FSS IN FIG. 6 WITH NON-NORMAL SECONDARY MEMBERSHIP FUNCTIONS BASED ON (24) AND (25) Fig. 7. Convex GT2 FS (A) and two identically shaped non-convex GT2 FSs (B and C ) at different locations.
Table VIII are intuitive with those given in Table VII where all FSs contain two zSlices.