general_diagnosis.MT {MTSYS} | R Documentation |
General function to implement a diagnosis method for a family of Mahalanobis-Taguchi (MT) methods
Description
general_diagnosis.MT
is the general function that implements a
diagnosis method for a family of Mahalanobis-Taguchi (MT) methods. Each
diagnosis method of a family of MT methods can be implemented by setting
the parameters of this function appropriately.
Usage
general_diagnosis.MT(unit_space, newdata, threshold,
includes_transformed_newdata = FALSE)
Arguments
unit_space |
Object generated as a unit space. |
newdata |
Matrix with n rows (samples) and p columns (variables). The data are used to calculate the desired distances from the unit space. All data should be continuous values and should not have missing values. |
threshold |
Numeric specifying the threshold value to classify each
sample into positive ( |
includes_transformed_newdata |
If |
Value
A list containing the following components is returned.
distance |
Vector with length n. Distances from the unit space to each sample. |
le_threshold |
Vector with length n. Logical values indicating the
distance of each sample is less than or equal to the
threhold value ( |
threshold |
Numeric value to classify the sample into positive or negative. |
unit_space |
Object passed by |
n |
The number of samples for |
q |
The number of independent variables after the data transformation. According to the data transoformation function, q may be equal to p. |
x |
If |
See Also
diagnosis.MT
, diagnosis.MTA
, and
diagnosis.RT
Examples
# 40 data for versicolor in the iris dataset
iris_versicolor <- iris[61:100, -5]
# The following settings are same as the MT method.
unit_space <- general_MT(unit_space_data = iris_versicolor,
generates_transform_function =
generates_normalization_function,
calc_A = function(x) solve(cor(x)),
includes_transformed_data = TRUE)
# 10 data for each kind (setosa, versicolor, virginica) in the iris dataset
iris_test <- iris[c(1:10, 51:60, 101:111), -5]
diagnosis <- general_diagnosis.MT(unit_space = unit_space,
newdata = iris_test,
threshold = 4,
includes_transformed_newdata = TRUE)
(diagnosis$distance)
(diagnosis$le_threshold)