RemoveNotFuzzy {FuzzyImputationTest} | R Documentation |
Removing values that are not fuzzy numbers.
Description
'RemoveNotFuzzy' removes all values that are not proper fuzzy numbers and restores the previous ones.
Usage
RemoveNotFuzzy(trueData, imputedData, trapezoidal = TRUE, ...)
Arguments
trueData |
Name of the input matrix (data frame or list) that is used to restore erroneous fuzzy numbers. |
imputedData |
Name of the input matrix (data frame or list) with fuzzy numbers to check their correctness. |
trapezoidal |
Logical value depending on the type of fuzzy values (triangular or trapezoidal ones) in the dataset. |
... |
Additional parameters passed to other functions. |
Details
The procedure checks all the values in the given matrix (or data frmame, or list) specified by imputedData
and if some of them are not proper fuzzy numbers (e.g., their cores are outside the supports), they are removed.
Instead of these erroneous values, the previous ones from the input matrix trueData
are restored.
These matrices (or data frames, or lists) should consist of fuzzy numbers (triangular fuzzy numbers if trapezoidal=FALSE
is set,
or trapezoidal ones if the default trapezoidal=TRUE
is used).
The output is given as a matrix where each row is related to fuzzy numbers (with 3 values for the triangular fuzzy numbers,
or 4 values in the case of trapezoidal ones) for the consecutive variables.
The input has to consist of fuzzy numbers of the same type (i.e., mixing triangular and trapezoidal fuzzy numbers is not allowed).
Value
The output is given as a matrix.
Examples
# matrix with proper values of triangular fuzzy numbers
matrixOK <- matrix(c(1,2,3,7,10,12,8,10,11),ncol=3,byrow = TRUE)
# matrix with the wrong third value of fuzzy triangular number (its core is greater than
# the left end of its support)
matrixFalse <- matrix(c(1,2,3,7,10,12,8,20,11),ncol=3,byrow = TRUE)
# remove the third value and restore the previous one
RemoveNotFuzzy(matrixOK,matrixFalse,trapezoidal = FALSE)