compose | R Documentation |
Composition of Fuzzy Relations
compose(
x,
y,
e = NULL,
alg = c("goedel", "goguen", "lukasiewicz"),
type = c("basic", "sub", "super", "square"),
quantifier = NULL,
sorting = sort
)
x |
A first fuzzy relation to be composed. It must be a numeric matrix
with values within the |
y |
A second fuzzy relation to be composed. It must be a numeric matrix
with values within the |
e |
Deprecated. An excluding fuzzy relation. If not NULL,
it must be a numeric matrix with dimensions equal to the |
alg |
An algebra to be used for composition. It must be one of
|
type |
A type of a composition to be performed. It must be one of
|
quantifier |
Deprecated. If not NULL, it must be a function taking a single
argument, a vector of relative cardinalities, that would be translated into
membership degrees. A result of the |
sorting |
Deprecated. Sorting function used within quantifier application. The given function
must sort the membership degrees and allow the |
Function composes a fuzzy relation x
(i.e. a numeric matrix of size
(u,v)
) with a fuzzy relation y
(i.e. a numeric matrix of size
(v,w)
) and possibly with the deprecated use of an exclusion fuzzy relation
e
(i.e. a numeric matrix of size (v,w)
).
The style of composition is determined by the algebra alg
, the
composition type type
, and possibly also by a deprecated quantifier
.
This function performs four main composition types, the basic composition (
also known as direct product), the Bandler-Kohout subproduct (also subdirect
product), the Bandler-Kohout superproduct (also supdirect product), and finally,
the Bandler-Kohout square product. More complicated composition operations
may be performed by using the mult()
function and/or by combining multiple
composition results with the algebra()
operations.
A matrix with v
rows and w
columns, where v
is the
number of rows of x
and w
is the number of columns of y
.
Michal Burda
[algebra(), mult()
, lingexpr()
R <- matrix(c(0.1, 0.6, 1, 0, 0, 0,
0, 0.3, 0.7, 0.9, 1, 1,
0, 0, 0.6, 0.8, 1, 0,
0, 1, 0.5, 0, 0, 0,
0, 0, 1, 1, 0, 0), byrow=TRUE, nrow=5)
S <- matrix(c(0.9, 1, 0.9, 1,
1, 1, 1, 1,
0.1, 0.2, 0, 0.2,
0, 0, 0, 0,
0.7, 0.6, 0.5, 0.4,
1, 0.9, 0.7, 0.6), byrow=TRUE, nrow=6)
RS <- matrix(c(0.6, 0.6, 0.6, 0.6,
1, 0.9, 0.7, 0.6,
0.7, 0.6, 0.5, 0.4,
1, 1, 1, 1,
0.1, 0.2, 0, 0.2), byrow=TRUE, nrow=5)
compose(R, S, alg='goedel', type='basic') # should be equal to RS
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.