Learn R Programming

lfl (version 2.0.1)

lcut3: Deprecated functions for transformation of data into a fsets S3 class of linguistic fuzzy attributes

Description

These functions are deprecated. Please use lcut() or fcut() instead.

Usage

lcut3(x, ...)

lcut5(x, ...)

# S3 method for default lcut3(x, ...)

# S3 method for default lcut5(...)

# S3 method for numeric lcut3( x, context = NULL, defaultCenter = 0.5, atomic = c("sm", "me", "bi"), hedges = c("ex", "si", "ve", "ml", "ro", "qr", "vr"), name = NULL, parallel = FALSE, ... )

# S3 method for numeric lcut5( x, context = NULL, defaultCenter = 0.5, atomic = c("sm", "lm", "me", "um", "bi"), hedges = c("ex", "ve", "ml", "ro", "ty"), name = NULL, parallel = FALSE, ... )

# S3 method for data.frame lcut3(x, context = NULL, name = NULL, parallel = FALSE, ...)

# S3 method for data.frame lcut5(x, context = NULL, name = NULL, parallel = FALSE, ...)

# S3 method for matrix lcut3(x, ...)

# S3 method for matrix lcut5(x, ...)

Arguments

x

Data to be transformed: if it is a numeric vector, matrix, or data frame, then the creation of linguistic fuzzy attributes takes place. For other data types the fcut() function is called implicitly.

...

Other parameters to some methods.

context

A definition of context of a numeric attribute. Context determines how people understand the notions "small", "medium", or "big" with respect to that attribute. If x is a numeric vector then context should be a vector of 3 numbers: typical small, medium, and big value. If the context is set to NULL, these values are taken directly from x as follows:

  • small: \(= min(x)\);

  • medium: \(= (max(x) - min(x)) * defaultCenter + min(x)\);

  • big: \(= max(x)\). If x is a matrix or data frame then context should be a named list of contexts for each x's column. If some context is omitted, it will be determined directly from data as explained above.

Regardless of the value of the atomic argument, all 3 numbers of the context must be provided everytime.

defaultCenter

A value used to determine a typical "medium" value from data (see context above). If context is not specified then typical "medium" is determined as $$(max(x) - min(x)) * defaultCenter + min(x).$$ Default value of defaultCenter is 0.5, however, some literature specifies 0.42 as another sensible value with proper linguistic interpretation.

atomic

A vector of atomic linguistic expressions to be used for creation of fuzzy attributes.

hedges

A vector of linguistic hedges to be used for creation of fuzzy attributes.

name

A name to be added as a suffix to the created fuzzy attribute names. This parameter can be used only if x is a numeric vector. If x is a matrix or data frame, name should be NULL because the fuzzy attribute names are taken from column names of parameter x. The name is also used as a value for the vars attribute of the resulting fsets() instance.

parallel

Whether the processing should be run in parallel or not. Parallelization is implemented using the foreach::foreach() function. The parallel environment must be set properly in advance, e.g. with the doMC::registerDoMC() function.

Value

An object of S3 class fsets is returned, which is a numeric matrix with columns representing the fuzzy attributes. Each source column of the x argument corresponds to multiple columns in the resulting matrix. Columns will have names derived from used \(hedges\), atomic expression, and \(name\) specified as the optional parameter.

The resulting object would also have set the vars() and specs() properties with the former being created from original column names (if x is a matrix or data frame) or the name argument (if x is a numeric vector). The specs() incidency matrix would be created to reflect the following order of the hedges: \("ex" < "si" < "ve" < "-" < "ml" < "ro" < "qr" < "vr"\) and \("ty" < "" < "ml" < "ro" < "qr" < "vr"\). Fuzzy attributes created from the same source numeric vector (or column) would be ordered that way, with other fuzzy attributes (from the other source) being incomparable.