Type: | Package |
Title: | Generating Triangular and Trapezoidal Fuzzy Random Numbers via Uniform Distribution |
Version: | 0.1.4 |
Maintainer: | Atchanut Rattanalertnusorn <atchanut_r@rmutt.ac.th> |
Description: | Triangular and trapezoidal fuzzy numbers are used to study fuzzy logic, fuzzy reasoning and approximating, fuzzy regression models, etc. This package builds the generating function for triangular and trapezoidal fuzzy numbers based on Souliotis et al. (2022)<doi:10.3390/math10183350>. They proposed a method for the construction of fuzzy numbers via a cumulative distribution function based on the possibility theory. |
License: | GPL-3 |
Language: | en-US |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.2 |
Imports: | graphics, stats |
Suggests: | testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
NeedsCompilation: | no |
Packaged: | 2024-06-02 02:10:03 UTC; COM |
Author: | Atchanut Rattanalertnusorn [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2024-06-04 09:46:35 UTC |
Alpha-cut of triangular fuzzy number
Description
This function for calculating alpha-cut of triangular fuzzy number. See detail in references.
Usage
acuttfn(left, middle, right, acut.level = seq(0, 1, by = 0.1))
Arguments
left |
the left point of triangular fuzzy number |
middle |
the middle or mode point of triangular fuzzy number |
right |
the right point of triangular fuzzy number |
acut.level |
the alpha-cut level of triangular fuzzy number |
Value
AL
is alpha-cut level,
XL.AL
is a lower alpha-cut point of triangular fuzzy number,
and XU.AL
is a upper alpha-cut point of triangular fuzzy number.
References
Klir, G.J., Yuan, B., & H., S.C.U. (1997). Fuzzy set theory: Foundations and applications. Prentice Hall PTR.
Examples
acuttfn(1,2,3,acut.level = c(0,0.5,1))
acuttfn(1,2.5,3,acut.level = c(0.00,0.25,0.50,0.75,1.00))
Alpha-cut of trapezoidal fuzzy number
Description
This function for calculating alpha-cut of trapezoidal fuzzy number. See detail in references.
Usage
acuttrfn(left, lmid, rmid, right, acut.level = seq(0, 1, by = 0.1))
Arguments
left |
the left point of trapezoidal fuzzy number |
lmid |
the left-middle point of trapezoidal fuzzy number |
rmid |
the right-middle point of trapezoidal fuzzy number |
right |
the right point of trapezoidal fuzzy number |
acut.level |
the alpha-cut level of trapezoidal fuzzy number |
Value
AL
is alpha-cut level,
XL.AL
is a lower alpha-cut point of trapezoidal fuzzy number,
and XU.AL
is a upper alpha-cut point of trapezoidal fuzzy number.
References
Klir, G.J., Yuan, B., & H., S.C.U. (1997). Fuzzy set theory: Foundations and applications. Prentice Hall PTR.
Examples
acuttrfn(1,2,3,5,acut.level = c(0,0.5,1))
acuttrfn(1,2.5,3.5,6,acut.level = c(0.00,0.25,0.50,0.75,1.00))
A generating function of triangular fuzzy number via uniform distribution
Description
A generating function of triangular fuzzy number via uniform distribution based on Souliotis et al. (2022). See detail in references.
Usage
rtfn(n, a, b)
Arguments
n |
total number of random triangular fuzzy number |
a |
the left point of triangular fuzzy number |
b |
the right point of triangular fuzzy number |
Value
A data frame with two variables, that is, x and mf
References
Souliotis, G., Alanazi, Y., & Papadopoulos, B. (2022). Construction of fuzzy numbers via cumulative distribution function. Mathematics, 10(18), 3350. https://doi.org/10.3390/math10183350
Examples
df <- rtfn(500,1,5)
head(df)
plot(df) # or plot(df,type='h')
A generating function of trapezoidal fuzzy number via uniform distribution
Description
A generating function of trapezoidal fuzzy number via uniform distribution based on Souliotis et al. (2022). See detail in references.
Usage
rtrfn(n, a, c, r, b)
Arguments
n |
total number of random trapezoidal fuzzy number |
a |
the left point of trapezoidal fuzzy number |
c |
the left-middle point of trapezoidal fuzzy number |
r |
the right-middle point of trapezoidal fuzzy number |
b |
the right point of trapezoidal fuzzy number |
Value
A data frame with two variables, that is, x and mf
Note
In general, a
< c
< r
< b
for generating a trapezoidal fuzzy random number.
If a
=c
=r
=b
, it will produce a crisp number.
If a
<c
=r
<b
, it will produce a triangular fuzzy random number.
References
Souliotis, G., Alanazi, Y., & Papadopoulos, B. (2022). Construction of fuzzy numbers via cumulative distribution function. Mathematics, 10(18), 3350. https://doi.org/10.3390/math10183350
Examples
df2<- rtrfn(500,1,3,4,6)
head(df2)
plot(df2) # or plot(df2,type='h')