Learn R Programming

SAFD (version 0.3)

bertoluzza: Bertoluzza distance

Description

Given two polygonal fuzzy numbers X, Y in the correct format (testing by checking) the function calculates the Bertoluzza distance of X, Y. The parameter theta (being the weight of the spread) has to fulfill theta>0, by default theta=1/3 (which corresponds to the Lebesgue measure as weighting measure on [0,1]). For detailed explanation see the papers [1] and [2] below.

Usage

bertoluzza(X, Y, theta = 1/3, pic = 0)

Arguments

X
...dataframe (polygonal fuzzy number)
Y
...dataframe (polygonal fuzzy number)
theta
...numeric and >0
pic
...numeric, if pic==1 X and Y are plotted, by default no plot is produced.

Value

  • ...in case X and Y fulfill the conditions tested implicitly by checking the code returns the Bertoluzza distance, otherwise NA is returned.

Details

See examples

References

[1] Trutschnig, W., Gonzalez-Rodriguez, G., Colubi, A., Gil, M.A.: A new family of metrics for compact, convex (fuzzy) sets based on a generalized concept of mid and spread, Information Sciences, 179(23), pp. 3964-3972 (2009) [2] Bertoluzza, C., Corral, N., Salas, A.: On a new class of distances between fuzzy numbers, Mathware Soft Comput., 2, pp:71-84 (1995)

See Also

See Also as Mmean, checking

Examples

Run this code
#
data(XX)
X<-translator(XX[[1]],50)
Y<-translator(XX[[2]],50)
Z<-translator(XX[[3]],50)
ZZ<-list(X,Y,Z)
b<-bertoluzza(X,Y,1/3,1)
b

#example (SLLN for the FRV)
V<-translator(XX[[3]],100)
YY<-vector("list",length=50)
  for(i in 1:50){
   YY[[i]]<-generator(V,,,)
   }
M<-Mmean(YY)
head(M)
b<-bertoluzza(M,V,1/3,1) 
b

V<-translator(XX[[3]],100)
YY<-vector("list",length=1000)
  for(i in 1:1000){
   YY[[i]]<-generator(V,,,)
   }
M<-Mmean(YY)
head(M)
b<-bertoluzza(M,V,1/3,1)  
b

#
X<-data.frame(x=c(0,1,1,2),alpha=c(0,1,1,0))
Y<-data.frame(x=c(0,1,2),alpha=c(0,1,0))
b<-bertoluzza(X,Y,1/3,1)
b

Run the code above in your browser using DataLab