R: Determine whether the first set of predicates is more...
is.specific
R Documentation
Determine whether the first set of predicates is more specific (or equal) than the other.
Description
Take two character vectors of predicates and determine whether x is more specific (or
equal w.r.t. the specificity) than y. The specificity relation is fully determined with
the values of vars vector and specs incidence matrix.
Usage
is.specific(x, y, vars, specs)
Arguments
x
The first character vector of predicates.
y
The second character vector of predicates.
vars
A named (typically character) vector that determines which predicates originate from the
same variable, i.e. which of them semantically deal with the same property.
For that purpose, each value of x or y must be present
in names(vars).
See also vars function of the fsets class.
specs
A square numeric matrix containing values from {0, 1}. It is a specificity matrix
for which rows and columns represent predicates.
specs[i][j] = 1 if and only if the i-th predicate is more specific (i.e. the
corresponding fuzzy set is a subset of) than the j-th predicate (i.e. x[, j]).
See also specs function of the fsets class.
Details
Let x_i, y_j represent any predicate of the vectors x, y.
Function assumes that each vector x and y does not contain two or more predicates
with the same value of vars.
This function returns TRUE iff all of the following conditions hold:
for any y_j there exists x_i such that vars[y_j] = vars[x_i];
for any x_i there either does not exist y_j such that vars[x_i] = vars[y_j]
or x_i = y_j or specs[x_i, y_j] = 1.