Wrapper function to generate a unit space for a family of Mahalanobis-Taguchi (MT) methods
Wrapper function to generate a unit space for a family of Mahalanobis-Taguchi (MT) methods
generates_unit_space generates a unit space for a family of Mahalanobis-Taguchi (MT) methods. The unit space of MT method, MTA method or RT method can be generated by passing a method name (character) into a parameter method.
unit_space_data: Matrix with n rows (samples) and p columns (variables). Data to generate the unit space. All data should be continuous values and should not have missing values.
method: Character to designate a method. Currently, "MT", "MTA", and "RT" are available.
includes_transformed_data: If TRUE, then the transformed data are included in a return object.
...: Passed to solve for computing the inverse of the correlation matrix in MT and RT
method.
Returns
A returned object depends on the selected method. See MT, MTA or RT.
Examples
# 40 data for versicolor in the iris datasetiris_versicolor <- iris[61:100,-5]# 10 data for each kind (setosa, versicolor, virginica) in the iris datasetiris_test <- iris[c(1:10,51:60,101:111),-5]# MT methodunit_space_MT <- generates_unit_space(unit_space_data = iris_versicolor, method ="MT")diagnosis_MT <- diagnosis(unit_space = unit_space_MT, newdata = iris_test, threshold =4)(diagnosis_MT$distance)(diagnosis_MT$le_threshold)# MTA methodunit_space_MTA <- generates_unit_space(unit_space_data = iris_versicolor, method ="MTA")diagnosis_MTA <- diagnosis(unit_space = unit_space_MTA, newdata = iris_test, threshold =0.5)(diagnosis_MTA$distance)(diagnosis_MTA$le_threshold)# RT methodunit_space_RT <- generates_unit_space(unit_space_data = iris_versicolor, method ="RT")diagnosis_RT <- diagnosis(unit_space = unit_space_RT, newdata = iris_test, threshold =0.2)(diagnosis_RT$distance)(diagnosis_RT$le_threshold)