| generator {SAFD} | R Documentation |
The second procedure described in [1] is implemented. Given an input dataframe V in the correct format (tested by checking), which will be the expectation of the simulated FRV first decomposer(V) is called. Loosely speaking, the dataframe Y returned by decomposer, which contains the "coordinates" of V with respect to a certain "basis" (see [1]), is perturbated stochastically in order to generate a new polygonal fuzzy number. The distributions used for theses perturbations can be selected in the call of the function, however, in this Version 0.01 only a view choices are possible: (1) The perturbation of the centre of the 1-cut pertV has to be of the form norm(0,sigma) or unif(-a,a), sigma,a>0. (2) The perturbation of the left part of the fuzzy set pertL has to be of the form chisq(1) or lnorm(a,b) with expectation=1. (3) The perturbation of the right part of the fuzzy set pertR has to be of the same form as that for the left part.
generator(V, pertV = list(dist = "norm", par = c(0, 1)), pertL = list(dist = "chisq", par = c(1)), pertR = list(dist = "chisq", par = c(1)))
V |
...polygonal fuzzy set in the correct format (tested by checking)
|
pertV |
...list containing elements "dist" and "par". "dist" denotes the chosen distribution family (normal or uniform) and "par" the corresponding parameters. |
pertL |
...list containing elements "dist" and "par". "dist" denotes the chosen distribution family (chisq or lnorm) and "par" the corresponding parameters. |
pertR |
...list containing elements "dist" and "par". "dist" denotes the chosen distribution family (chisq or lnorm) and "par" the corresponding parameters. |
See examples
Given correct input data, the function returns a polygonal fuzzy number that can be seen as a realisation of a FRV with expectation V (see [1]).
In case you find (almost surely existing) bugs or have recommendations for improving the functions comments are welcome to the above mentioned mail addresses.
Wolfgang Trutschnig <wolfgang.trutschnig@softcomputing.es>, Asun Lubiano <lubiano@uniovi.es>
[1] Gonzalez-Rodriguez, G., Colubi, A., Trutschnig, W.: Simulation of fuzzy random variables, Information Sciences, 179(5), pp. 642-653 (2009)
See Also as decomposer, checking
data(XX)
V<-translator(XX[[3]],100)
YY<-list(length=100)
for(i in 1:100){
YY[[i]]<-generator(V,,,)
}
M<-Mmean(YY)
plot(M,type="l",xlim=c(-3,4))
lines(V,type="l",col="red",lwd=2)