
Last chance! 50% off unlimited learning
Sale ends in
Examine rules in a list and remove all of them for whose other more specific
rules are present in the list. The specificity is determined by calling the
is.specific()
function. This operation is a part of the
pbld()
inference mechanism.
perceive(
rules,
fsets,
type = c("global", "local"),
fired = NULL,
vars = NULL,
specs = NULL
)
A list of character vectors where each element is a fuzzy set name (a predicate) and thus each such vector forms a rule.
A valid instance of the fsets()
class such that all predicates
in rules
(i.e., all values of all character vectors in rules$rules
)
can be found in colnames(fsets)
The type of perception to use. It can be either "local"
or "global"
(default).
If type=="global"
then this argument can be NULL. If
type
is "local"
then fired
must be a numeric vector of
values in the interval rules
argument.
A deprecated parameter that must be NULL
. Formerly, it was
a named (typically character) vector that determined which
predicates originate from the same variable, i.e. which of them semantically
deal with the same property. For that purpose, each value from any vector
stored in the rules
list must be present in names(vars)
. See
also vars()
function of the fsets()
class.
A deprecated parameter that must be NULL
. Formerly, it was
a square numeric matrix containing values from rules
'es predicate specs[i][j] = 1
if and only if the
x[, j]
). See also
specs()
function of the fsets()
class.
A modified list of rules for which no other more specific rule exists. (Each rule is a vector.)
In other words, for each rule x
in the rules
list, it searches for another
rule y
such that is.specific(y, x)
returns TRUE. If yes then
x
is removed from the list.
# NOT RUN {
# prepare fsets
f <- lcut(data.frame(a=0:1, b=0:1, c=0:1, d=0:1))
# run perceive function: (sm.a, bi.c) has
# more specific rule (ve.sm.a, bi.c)
perceive(list(c('sm.a', 'bi.c'),
c('ve.sm.a', 'bi.c'),
c('sm.b', 'sm.d')),
f)
# }
Run the code above in your browser using DataLab