Title: | Methods in Mahalanobis-Taguchi (MT) System |
---|---|
Description: | Mahalanobis-Taguchi (MT) system is a collection of multivariate analysis methods developed for the field of quality engineering. MT system consists of two families depending on their purpose. One is a family of Mahalanobis-Taguchi (MT) methods (in the broad sense) for diagnosis (see Woodall, W. H., Koudelik, R., Tsui, K. L., Kim, S. B., Stoumbos, Z. G., and Carvounis, C. P. (2003) <doi:10.1198/004017002188618626>) and the other is a family of Taguchi (T) methods for forecasting (see Kawada, H., and Nagata, Y. (2015) <doi:10.17929/tqs.1.12>). The MT package contains three basic methods for the family of MT methods and one basic method for the family of T methods. The MT method (in the narrow sense), the Mahalanobis-Taguchi Adjoint (MTA) methods, and the Recognition-Taguchi (RT) method are for the MT method and the two-sided Taguchi (T1) method is for the family of T methods. In addition, the Ta and Tb methods, which are the improved versions of the T1 method, are included. |
Authors: | Akifumi Okayama [aut, cre], Masato Ohkubo [ctb], Yasushi Nagata [ctb] |
Maintainer: | Akifumi Okayama <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.2.1 |
Built: | 2024-11-08 02:40:55 UTC |
Source: | https://github.com/okayaa/mtsys |
calc_cofactor
calculates a cofactor matrix.
calc_cofactor(data)
calc_cofactor(data)
data |
Matrix with n rows (samples) and p columns (variables). All data should be continuous values and should not have missing values. |
calc_cofactor
returns a cofactor matrix of size p x p.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] calc_cofactor(cov(iris_versicolor))
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] calc_cofactor(cov(iris_versicolor))
calc_M_hat
estimates M values (M hat) for the T method.
calc_M_hat(X, beta_hat, eta_hat)
calc_M_hat(X, beta_hat, eta_hat)
X |
Matrix with n rows (samples) and q columns (variables). The independent variable data after the data transformation. All data should be continuous values and should not have missing values. |
beta_hat |
Vector with length q. Estimated proportionality constants between each independent variable and the dependent variable. |
eta_hat |
Vector with length q. Estimated squared signal-to-noise ratios
(S/N) coresponding to |
Vector with length n. Estimated M values (M hat).
general_T
and general_forecasting.T
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, includes_transformed_data = TRUE) modified_eta_hat <- model$eta_hat modified_eta_hat[3] <- 0 (modified_M_hat <- calc_M_hat(model$X, model$beta_hat, modified_eta_hat))
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, includes_transformed_data = TRUE) modified_eta_hat <- model$eta_hat modified_eta_hat[3] <- 0 (modified_M_hat <- calc_M_hat(model$X, model$beta_hat, modified_eta_hat))
calc_M_hat
calculates the overall prediction eta for the T method.
calc_overall_predicton_eta(M, M_hat, subtracts_V_e = TRUE)
calc_overall_predicton_eta(M, M_hat, subtracts_V_e = TRUE)
M |
Vector with length n. The (true) value of the dependent variable after the data trasformation. |
M_hat |
Vector with length n. The estimated values of the dependent variable after the data trasformation. |
subtracts_V_e |
If |
Numeric. Overall prediction eta which is used to measure the estimation accuracy.
general_T
and general_forecasting.T
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) modified_eta_hat <- model$eta_hat modified_eta_hat[3] <- 0 modified_M_hat <- calc_M_hat(model$X, model$beta_hat, modified_eta_hat) (modified_overall_predicton_eta <- calc_overall_predicton_eta(model$M, modified_M_hat, subtracts_V_e = TRUE))
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) modified_eta_hat <- model$eta_hat modified_eta_hat[3] <- 0 modified_M_hat <- calc_M_hat(model$X, model$beta_hat, modified_eta_hat) (modified_overall_predicton_eta <- calc_overall_predicton_eta(model$M, modified_M_hat, subtracts_V_e = TRUE))
diagnosis
is a generic function. For details, see
diagnosis.MT
, diagnosis.MTA
,
diagnosis.RT
or general_diagnosis.MT
.
diagnosis(unit_space, newdata, threshold, includes_transformed_newdata)
diagnosis(unit_space, newdata, threshold, includes_transformed_newdata)
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 |
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 variables after the data transformation. |
x |
If |
diagnosis.MT
, diagnosis.MTA
, and
diagnosis.RT
diagnosis.MT
(via diagnosis
) calculates the
mahalanobis distance based on the unit space generated by MT
or generates_unit_space
(..., method = "MT") and classifies
each sample into positive (TRUE
) or negative (FALSE
) by
comparing the values with the set threshold value.
## S3 method for class 'MT' diagnosis(unit_space, newdata, threshold = 4, includes_transformed_newdata = FALSE)
## S3 method for class 'MT' diagnosis(unit_space, newdata, threshold = 4, includes_transformed_newdata = FALSE)
unit_space |
Object of class "MT" generated by |
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 |
diagnosis.MT
(via diagnosis
) returns a list
containing the following components:
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 of class "MT" passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. q equals p. |
x |
If |
Taguchi, G. (1995). Pattern Recognition and Quality Engineering (1). Journal of Quality Engineering Society, 3(2), 2-5. (In Japanese)
Taguchi, G., Wu, Y., & Chodhury, S. (2000). Mahalanobis-Taguchi System. McGraw-Hill Professional.
Taguchi, G., & Jugulum, R. (2002). The Mahalanobis-Taguchi strategy: A pattern technology system. John Wiley & Sons.
Woodall, W. H., Koudelik, R., Tsui, K. L., Kim, S. B., Stoumbos, Z. G., & Carvounis, C. P. (2003). A review and analysis of the Mahalanobis-Taguchi system. Technometrics, 45(1), 1-15.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MT <- MT(unit_space_data = iris_versicolor, 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_MT <- diagnosis(unit_space = unit_space_MT, newdata = iris_test, threshold = 4, includes_transformed_newdata = TRUE) (diagnosis_MT$distance) (diagnosis_MT$le_threshold)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MT <- MT(unit_space_data = iris_versicolor, 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_MT <- diagnosis(unit_space = unit_space_MT, newdata = iris_test, threshold = 4, includes_transformed_newdata = TRUE) (diagnosis_MT$distance) (diagnosis_MT$le_threshold)
diagnosis.MTA
(via diagnosis
) calculates the distance
based on the unit space generated by MTA
or
generates_unit_space
(..., method = "MTA") and classifies each
sample into positive (TRUE
) or negative (FALSE
) by comparing
the values with the set threshold value.
## S3 method for class 'MTA' diagnosis(unit_space, newdata, threshold, includes_transformed_newdata = FALSE)
## S3 method for class 'MTA' diagnosis(unit_space, newdata, threshold, includes_transformed_newdata = FALSE)
unit_space |
Object of class "MTA" generated by |
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 |
diagnosis.MTA
(via diagnosis
) returns a list
containing the following components:
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 of class "MTA" passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. q equals p. |
x |
If |
Taguchi, G. & Kanetaka, T. (2002). Engineering Technical Development in MT System - Lecture on Applied Quality. Japanese Standards Association. (In Japanese)
Taguchi, G., & Jugulum, R. (2002). The Mahalanobis-Taguchi strategy: A pattern technology system. John Wiley & Sons.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MTA <- MTA(unit_space_data = iris_versicolor, 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_MTA <- diagnosis(unit_space = unit_space_MTA, newdata = iris_test, threshold = 0.5, includes_transformed_newdata = TRUE) (diagnosis_MTA$distance) (diagnosis_MTA$le_threshold)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MTA <- MTA(unit_space_data = iris_versicolor, 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_MTA <- diagnosis(unit_space = unit_space_MTA, newdata = iris_test, threshold = 0.5, includes_transformed_newdata = TRUE) (diagnosis_MTA$distance) (diagnosis_MTA$le_threshold)
diagnosis.RT
(via diagnosis
) calculates the
distance based on the unit space generated by RT
or
generates_unit_space
(..., method = "RT") and classifies each
sample into positive (TRUE
) or negative (FALSE
) by comparing
the values with the set threshold value.
## S3 method for class 'RT' diagnosis(unit_space, newdata, threshold, includes_transformed_newdata = FALSE)
## S3 method for class 'RT' diagnosis(unit_space, newdata, threshold, includes_transformed_newdata = FALSE)
unit_space |
Object of class "RT" generated by |
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 |
diagnosis.RT
(via diagnosis
) returns a list
containing the following components:
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 of class "RT" passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. q is always 2. |
x |
If |
Taguchi, G. (2006). Objective Function and Generic Function (11). Journal of Quality Engineering Society, 14(2), 5-9. (In Japanese)
Huda, F., Kajiwara, I., Hosoya, N., & Kawamura, S. (2013). Bolt loosening analysis and diagnosis by non-contact laser excitation vibration tests. Mechanical systems and signal processing, 40(2), 589-604.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_RT <- RT(unit_space_data = iris_versicolor, 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_RT <- diagnosis(unit_space = unit_space_RT, newdata = iris_test, threshold = 0.2, includes_transformed_newdata = TRUE) (diagnosis_RT$distance) (diagnosis_RT$le_threshold)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_RT <- RT(unit_space_data = iris_versicolor, 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_RT <- diagnosis(unit_space = unit_space_RT, newdata = iris_test, threshold = 0.2, includes_transformed_newdata = TRUE) (diagnosis_RT$distance) (diagnosis_RT$le_threshold)
forecasting
is a generic function. For details, see
forecasting.T1
, forecasting.Ta
,
forecasting.Tb
or general_forecasting.T
.
forecasting(model, newdata, includes_transformed_newdata)
forecasting(model, newdata, includes_transformed_newdata)
model |
Object generated as a model. |
newdata |
Matrix with n rows (samples) and p columns (variables). The Data to be estimated. All data should be continuous values and should not have missing values. |
includes_transformed_newdata |
If |
A list containing the following components is returned.
M_hat |
Vector with length n. The estimated values of the dependent variable after the data trasformation. |
y_hat |
Vector with length n. The estimated values after the inverse
transformation from |
model |
Object passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. |
X |
If |
forecasting.T1
, forecasting.Ta
, and
forecasting.Tb
forecasting.T1
(via forecasting
) estimates the dependent
values based on the T1 model.
## S3 method for class 'T1' forecasting(model, newdata, includes_transformed_newdata = FALSE)
## S3 method for class 'T1' forecasting(model, newdata, includes_transformed_newdata = FALSE)
model |
Object of class "T1" generated by |
newdata |
Matrix with n rows (samples) and p columns (variables). The Data to be estimated. All data should be continuous values and should not have missing values. |
includes_transformed_newdata |
If |
A list containing the following components is returned.
M_hat |
Vector with length n. The estimated values of the dependent variable after the data transformation. |
y_hat |
Vector with length n. The estimated values after the inverse
transformation from |
model |
Object of class "T1" passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. q equals p. |
X |
If |
Taguchi, G. (2006). Objective Function and Generic Function (12). Journal of Quality Engineering Society, 14(3), 5-9. (In Japanese)
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] model_T1 <- T1(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, subtracts_V_e = TRUE, includes_transformed_data = TRUE) # The following test samples are chosen casually. stackloss_test <- stackloss[c(2, 12, 19), -4] forecasting_T1 <- forecasting(model = model_T1, newdata = stackloss_test, includes_transformed_newdata = TRUE) (forecasting_T1$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] model_T1 <- T1(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, subtracts_V_e = TRUE, includes_transformed_data = TRUE) # The following test samples are chosen casually. stackloss_test <- stackloss[c(2, 12, 19), -4] forecasting_T1 <- forecasting(model = model_T1, newdata = stackloss_test, includes_transformed_newdata = TRUE) (forecasting_T1$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
forecasting.Ta
(via forecasting
) estimates the dependent
values based on the Ta model.
## S3 method for class 'Ta' forecasting(model, newdata, includes_transformed_newdata = FALSE)
## S3 method for class 'Ta' forecasting(model, newdata, includes_transformed_newdata = FALSE)
model |
Object of class "Ta" generated by |
newdata |
Matrix with n rows (samples) and p columns (variables). The Data to be estimated. All data should be continuous values and should not have missing values. |
includes_transformed_newdata |
If |
A list containing the following components is returned.
M_hat |
Vector with length n. The estimated values of the dependent variable after the data transformation. |
y_hat |
Vector with length n. The estimated values after the inverse
transformation from |
model |
Object of class "Ta" passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. q equals p. |
X |
If |
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
model_Ta <- Ta(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) forecasting_Ta <- forecasting(model = model_Ta, newdata = stackloss[c(2, 12, 19), -4], includes_transformed_newdata = TRUE) (forecasting_Ta$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
model_Ta <- Ta(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) forecasting_Ta <- forecasting(model = model_Ta, newdata = stackloss[c(2, 12, 19), -4], includes_transformed_newdata = TRUE) (forecasting_Ta$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
forecasting.Tb
(via forecasting
) estimates the dependent
values based on the Tb model.
## S3 method for class 'Tb' forecasting(model, newdata, includes_transformed_newdata = FALSE)
## S3 method for class 'Tb' forecasting(model, newdata, includes_transformed_newdata = FALSE)
model |
Object of class "Tb" generated by |
newdata |
Matrix with n rows (samples) and p columns (variables). The Data to be estimated. All data should be continuous values and should not have missing values. |
includes_transformed_newdata |
If |
A list containing the following components is returned.
M_hat |
Vector with length n. The estimated values of the dependent variable after the data transformation. |
y_hat |
Vector with length n. The estimated values after the inverse
transformation from |
model |
Object of class "Tb" passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. q equals p. |
X |
If |
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
model_Tb <- Tb(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) forecasting_Tb <- forecasting(model = model_Tb, newdata = stackloss[c(2, 12, 19), -4], includes_transformed_newdata = TRUE) (forecasting_Tb$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
model_Tb <- Tb(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) forecasting_Tb <- forecasting(model = model_Tb, newdata = stackloss[c(2, 12, 19), -4], includes_transformed_newdata = TRUE) (forecasting_Tb$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
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.
general_diagnosis.MT(unit_space, newdata, threshold, includes_transformed_newdata = FALSE)
general_diagnosis.MT(unit_space, newdata, threshold, includes_transformed_newdata = FALSE)
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 |
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 |
diagnosis.MT
, diagnosis.MTA
, and
diagnosis.RT
# 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)
# 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)
general_forecasting.T
is the general function that implements a
forecasting method for a family of Taguchi (T) methods. Each forecasting
method of a family of T methods can be implemented by setting the
parameters of this function appropriately.
general_forecasting.T(model, newdata, includes_transformed_newdata = FALSE)
general_forecasting.T(model, newdata, includes_transformed_newdata = FALSE)
model |
Object generated as a model. |
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. |
includes_transformed_newdata |
If |
A list containing the following components is returned.
M_hat |
Vector with length n. The estimated values of the dependent variable after the data trasformation. |
y_hat |
Vector with length n. The estimated values after the inverse
transformation from |
model |
Object passed by |
n |
The number of samples for |
q |
The number of variables after the data transformation. |
X |
If |
forecasting.T1
, forecasting.Ta
, and
forecasting.Tb
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) # The following test samples are chosen casually. stackloss_test <- stackloss[c(2, 12, 19), -4] forecasting <- general_forecasting.T(model = model, newdata = stackloss_test, includes_transformed_newdata = TRUE) (forecasting$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) # The following test samples are chosen casually. stackloss_test <- stackloss[c(2, 12, 19), -4] forecasting <- general_forecasting.T(model = model, newdata = stackloss_test, includes_transformed_newdata = TRUE) (forecasting$y_hat) # Estimated values (stackloss[c(2, 12, 19), 4]) # True values
general_MT
is a (higher-order) general function that generates a unit
space for a family of Mahalanobis-Taguchi (MT) methods. Each MT method can
be implemented by setting the parameters of this function appropriately.
general_MT(unit_space_data, calc_A, generates_transform_function, includes_transformed_data = FALSE)
general_MT(unit_space_data, calc_A, generates_transform_function, includes_transformed_data = FALSE)
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. |
calc_A |
Function that returns A in a quadratic form x'Ax. |
generates_transform_function |
Function that takes |
includes_transformed_data |
If |
A list containing the following components is returned.
A |
q x q matrix calculated by |
calc_A |
Function passed by |
transforms_data |
Data transformation function generated from
|
distance |
Vector with length n. Distances from the unit space to each sample. |
n |
The number of samples. |
q |
The number of independent variables after the data transformation. According to the data transoformation function, q may be equal to p. |
x |
If |
# 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) (unit_space$distance)
# 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) (unit_space$distance)
general_T
is a (higher-order) general function that generates a
prediction expression for a family of Taguchi (T) methods. Each T method
can be implemented by setting the parameters of this function appropriately.
general_T(unit_space_data, signal_space_data, generates_transform_functions, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
general_T(unit_space_data, signal_space_data, generates_transform_functions, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
unit_space_data |
Matrix with n rows (samples) and (p + 1) columns
(variables). The 1 ~ p th columns are independent
variables and the (p + 1) th column is a dependent
variable. Underlying data to obtain a representative
point for the normalization of the
|
signal_space_data |
Matrix with m rows (samples) and (p + 1) columns (variables). The 1 ~ p th columns are independent variables and the (p + 1) th column is a dependent variable. Underlying data to generate a prediction expression. All data should be continuous values and should not have missing values. |
generates_transform_functions |
A function that takes the
|
subtracts_V_e |
If |
includes_transformed_data |
If |
A list containing the following components is returned.
beta_hat |
Vector with length q. Estimated proportionality constants between each independent variable and the dependent variable. |
subtracts_V_e |
Logical. If |
eta_hat |
Vector with length q. Estimated squared signal-to-noise
ratios (S/N) coresponding to |
M_hat |
Vector with length n. The estimated values of the dependent
variable after the data transformation for
|
overall_prediction_eta |
Numeric. The overall squared signal-to-noise ratio (S/N). |
transforms_independent_data |
Data transformation function generated
from |
transforms_dependent_data |
Data transformation function generated in
|
inverses_transformed_dependent_data |
Inverse function generated in the
|
m |
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 |
M |
If |
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model$M_hat)
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following settings are same as the T1 method. model <- general_T(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, generates_transform_functions = generates_transformation_functions_T1, subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model$M_hat)
generates_dimensionality_reduction_function
returns the data
transformation function for the Recognition-Taguchi (RT) method based on
the unit_space_data
. The function reduces the dimensionality of data
into 2 synthetic variables.
generates_dimensionality_reduction_function(unit_space_data)
generates_dimensionality_reduction_function(unit_space_data)
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. |
Function is returned which takes an n x p matrix as an (only) argument and returns a dimensionality-reduced n x 2 data frame with named columns; Y_1 and Y_2.
Taguchi, G. (2006). Objective Function and Generic Function (11). Journal of Quality Engineering Society, 14(2), 5-9. (In Japanese)
Huda, F., Kajiwara, I., Hosoya, N., & Kawamura, S. (2013). Bolt loosening analysis and diagnosis by non-contact laser excitation vibration tests. Mechanical systems and signal processing, 40(2), 589-604.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] reduces_dimensionality <- generates_dimensionality_reduction_function(iris_versicolor) is.function(reduces_dimensionality) # TRUE
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] reduces_dimensionality <- generates_dimensionality_reduction_function(iris_versicolor) is.function(reduces_dimensionality) # TRUE
generates_model
generates a model for a family of Taguchi (MT) methods.
The model of T1
method, Ta
method or the
Tb
method can be generated by passing a method name
(character) into a parameter method
.
generates_model(unit_space_data, signal_space_data, sample_data, method = c("T1", "Ta", "Tb"), subtracts_V_e = TRUE, includes_transformed_data = FALSE)
generates_model(unit_space_data, signal_space_data, sample_data, method = c("T1", "Ta", "Tb"), subtracts_V_e = TRUE, includes_transformed_data = FALSE)
unit_space_data |
Used only for the T1 method. Matrix with n rows
(samples) and (p + 1) columns (variables). The 1 ~ p
th columns are independent variables and the (p + 1)
th column is a dependent variable. Underlying data
to obtain a representative point for the
normalization of |
signal_space_data |
Used only for the T1 method. Matrix with m rows (samples) and (p + 1) columns (variables). The 1 ~ p th columns are independent variables and the (p + 1) th column is a dependent variable. Underlying data to generate a prediction expression. All data should be continuous values and should not have missing values. |
sample_data |
Used for the Ta and the Tb methods. Matrix with n rows (samples) and (p + 1) columns (variables). The 1 ~ p th columns are independent variables and the (p + 1) th column is a dependent variable. 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. |
subtracts_V_e |
If |
includes_transformed_data |
If |
A returned object depends on the selected method. See T1
,
Ta
or Tb
.
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following test samples are chosen casually. stackloss_test <- stackloss[c(2, 12, 19), -4] # T1 method model_T1 <- generates_model(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, method = "T1", subtracts_V_e = TRUE) forecasting_T1 <- forecasting(model = model_T1, newdata = stackloss_test) (forecasting_T1$y_hat) # Ta method model_Ta <- generates_model(sample_data = rbind(stackloss_center, stackloss_signal), method = "Ta", subtracts_V_e = TRUE) forecasting_Ta <- forecasting(model = model_Ta, newdata = stackloss_test) (forecasting_Ta$y_hat) # Tb method model_Tb <- generates_model(sample_data = rbind(stackloss_center, stackloss_signal), method = "Tb", subtracts_V_e = TRUE) forecasting_Tb <- forecasting(model = model_Tb, newdata = stackloss_test) (forecasting_Tb$y_hat)
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] # The following test samples are chosen casually. stackloss_test <- stackloss[c(2, 12, 19), -4] # T1 method model_T1 <- generates_model(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, method = "T1", subtracts_V_e = TRUE) forecasting_T1 <- forecasting(model = model_T1, newdata = stackloss_test) (forecasting_T1$y_hat) # Ta method model_Ta <- generates_model(sample_data = rbind(stackloss_center, stackloss_signal), method = "Ta", subtracts_V_e = TRUE) forecasting_Ta <- forecasting(model = model_Ta, newdata = stackloss_test) (forecasting_Ta$y_hat) # Tb method model_Tb <- generates_model(sample_data = rbind(stackloss_center, stackloss_signal), method = "Tb", subtracts_V_e = TRUE) forecasting_Tb <- forecasting(model = model_Tb, newdata = stackloss_test) (forecasting_Tb$y_hat)
generates_normalization_function
returns the data normalization
function. The data normalization function is generated based on
unit_space_data
.
generates_normalization_function(unit_space_data, unit_space_center, unit_space_scale, is_scaled = TRUE)
generates_normalization_function(unit_space_data, unit_space_center, unit_space_scale, is_scaled = TRUE)
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. |
unit_space_center |
Vector with length p. The values are subtrahends in
normalization. If missing, the mean for each
column of |
unit_space_scale |
Vector with length p. The values are divisors in
normalization. If missing and |
is_scaled |
Logical. If |
Function is returned which takes an n x p matrix as an (only)
argument and returns a normalized n x p matrix. The normalization
is conducted based on unit_space_data
.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] normalizes_data <- generates_normalization_function(iris_versicolor) is.function(normalizes_data) # TRUE
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] normalizes_data <- generates_normalization_function(iris_versicolor) is.function(normalizes_data) # TRUE
generates_transformation_functions_T1
is the argument for the
parameter generates_transform_functions
in genera_T
, which
is used in the T1 method. In addtion, the Ta method also uses this function
for the argument.
generates_transformation_functions_T1(unit_space_data)
generates_transformation_functions_T1(unit_space_data)
unit_space_data |
Matrix with n rows (samples) and (p + 1) columns (variables). Data to generate the unit space. All data should be continuous values and should not have missing values. |
generates_transformation_functions_T1
returns a list
containing three functions. For the first component, the data
transformation function for independent variables is a function
that subtracts the mean of each independent variable. For the
second component, the data transformation function for a dependent
variable is a function that subtracts the mean of a dependent
variable. For the third component, the inverse function of the data
transformation function for a dependent variable is a function that
adds the mean of a dependent variable. The mean used is the mean of
the unit_space_data
.
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] tmp <- generates_transformation_functions_T1(stackloss_center) mean_subtraction_function <- tmp[[1]] subtracts_M_0 <- tmp[[2]] adds_M_0 <- tmp[[3]] is.function(mean_subtraction_function) # TRUE is.function(subtracts_M_0) # TRUE is.function(adds_M_0) # TRUE
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] tmp <- generates_transformation_functions_T1(stackloss_center) mean_subtraction_function <- tmp[[1]] subtracts_M_0 <- tmp[[2]] adds_M_0 <- tmp[[3]] is.function(mean_subtraction_function) # TRUE is.function(subtracts_M_0) # TRUE is.function(adds_M_0) # TRUE
generates_transformation_functions_Tb
is the argument for the
parameter generates_transform_functions
in genera_T
, which
is used in the Tb method.
generates_transformation_functions_Tb(sample_data, subtracts_V_e)
generates_transformation_functions_Tb(sample_data, subtracts_V_e)
sample_data |
Matrix with n rows (samples) and (p + 1) columns (variables). The Tb method uses all data to generate the unit space. All data should be continuous values and should not have missing values. |
subtracts_V_e |
If |
generates_transformation_functions_Tb
returns a list
containing three functions. For the first component, the data
transformation function for independent variables is a function
that subtracts the center of each independent variable. The center
is determined in a specific manner for the Tb method. The center
consists of each sample value which maximizes the signal-to-noise
ratio (S/N) per independent variable. The values are determined
independently so that different samples may be selected for
different variables. For the second component, the data
transformation function for a dependent variable is a function that
subtracts the dependent variable of the sample which maximizes the
S/N per independent variable. For the third component, the inverse
function of the data transformation function for a dependent
variable is a function that adds the weighted mean of a dependent
variable. The weighted mean is calculated based on the S/N and the
frequency of being selected in independent variables.
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] tmp <- generates_transformation_functions_Tb(stackloss_center, TRUE) center_subtraction_function <- tmp[[1]] subtracts_ys <- tmp[[2]] adds_M_0 <- tmp[[3]] is.function(center_subtraction_function) # TRUE is.function(subtracts_ys) # TRUE is.function(adds_M_0) # TRUE # Note that dynamic scope is used when the parameter "subtracts_V_e" is not # set. subtracts_V_e <- FALSE tmp <- generates_transformation_functions_Tb(stackloss_center) center_subtraction_function <- tmp[[1]] subtracts_ys <- tmp[[2]] adds_M_0 <- tmp[[3]] is.function(center_subtraction_function) # TRUE is.function(subtracts_ys) # TRUE is.function(adds_M_0) # TRUE
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] tmp <- generates_transformation_functions_Tb(stackloss_center, TRUE) center_subtraction_function <- tmp[[1]] subtracts_ys <- tmp[[2]] adds_M_0 <- tmp[[3]] is.function(center_subtraction_function) # TRUE is.function(subtracts_ys) # TRUE is.function(adds_M_0) # TRUE # Note that dynamic scope is used when the parameter "subtracts_V_e" is not # set. subtracts_V_e <- FALSE tmp <- generates_transformation_functions_Tb(stackloss_center) center_subtraction_function <- tmp[[1]] subtracts_ys <- tmp[[2]] adds_M_0 <- tmp[[3]] is.function(center_subtraction_function) # TRUE is.function(subtracts_ys) # TRUE is.function(adds_M_0) # TRUE
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
.
generates_unit_space(unit_space_data, method = c("MT", "MTA", "RT"), includes_transformed_data = FALSE, ...)
generates_unit_space(unit_space_data, method = c("MT", "MTA", "RT"), includes_transformed_data = FALSE, ...)
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 |
... |
Passed to |
A returned object depends on the selected method. See MT
,
MTA
or RT
.
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] # 10 data for each kind (setosa, versicolor, virginica) in the iris dataset iris_test <- iris[c(1:10, 51:60, 101:111), -5] # MT method unit_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 method unit_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 method unit_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)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] # 10 data for each kind (setosa, versicolor, virginica) in the iris dataset iris_test <- iris[c(1:10, 51:60, 101:111), -5] # MT method unit_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 method unit_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 method unit_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)
MT
generates a unit space for the Mahalanobis-Taguchi (MT) method. In
general_MT
, the inversed correlation matrix is used for A and
the data are normalized based on unit_space_data
.
MT(unit_space_data, includes_transformed_data = FALSE, ...)
MT(unit_space_data, includes_transformed_data = FALSE, ...)
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. |
includes_transformed_data |
If |
... |
Passed to |
MT
returns an object of S3 class "MT". An object
of class "MT" is a list containing the following components:
A |
p x p (q x q) matrix. Inversed correlation matrix of
|
calc_A |
|
transforms_data |
Function to be generated from
|
distance |
Vector with length n. Distances from the unit space to each sample. |
n |
The number of samples. |
q |
The number of variables after the data transformation. q is equal to p. |
x |
If |
Taguchi, G. (1995). Pattern Recognition and Quality Engineering (1). Journal of Quality Engineering Society, 3(2), 2-5. (In Japanese)
Taguchi, G., Wu, Y., & Chodhury, S. (2000). Mahalanobis-Taguchi System. McGraw-Hill Professional.
Taguchi, G., & Jugulum, R. (2002). The Mahalanobis-Taguchi strategy: A pattern technology system. John Wiley & Sons.
Woodall, W. H., Koudelik, R., Tsui, K. L., Kim, S. B., Stoumbos, Z. G., & Carvounis, C. P. (2003). A review and analysis of the Mahalanobis-Taguchi system. Technometrics, 45(1), 1-15.
solve
, general_MT
,
generates_normalization_function
, and
diagnosis.MT
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MT <- MT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE) # The following tol is a parameter passed to solve function. unit_space_MT <- MT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE, tol = 1e-9) (unit_space_MT$distance)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MT <- MT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE) # The following tol is a parameter passed to solve function. unit_space_MT <- MT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE, tol = 1e-9) (unit_space_MT$distance)
MTA
generates a unit space for the Mahalanobis-Taguchi Adjoint (MTA)
method. In general_MT
, cofactor matrix is used for A and
the data are normalized based on unit_space_data
.
MTA(unit_space_data, includes_transformed_data = FALSE)
MTA(unit_space_data, includes_transformed_data = FALSE)
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. |
includes_transformed_data |
If |
MTA
returns an object of S3 class "MTA". An
object of class "MTA" is a list containing the following components:
A |
p x p (q x q) matrix. Cofactor matrix of |
calc_A |
|
transforms_data |
Function to be generated from the
|
distance |
Vector with length n. Distances from the unit space to each sample. |
n |
The number of samples. |
q |
The number of variables after the data transformation. q equals p. |
x |
If |
Taguchi, G. & Kanetaka, T. (2002). Engineering Technical Development in MT System - Lecture on Applied Quality. Japanese Standards Association. (In Japanese)
Taguchi, G., & Jugulum, R. (2002). The Mahalanobis-Taguchi strategy: A pattern technology system. John Wiley & Sons.
calc_cofactor
, general_MT
,
generates_normalization_function
, and
diagnosis.MT
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MTA <- MTA(unit_space_data = iris_versicolor, includes_transformed_data = TRUE) (unit_space_MTA$distance)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_MTA <- MTA(unit_space_data = iris_versicolor, includes_transformed_data = TRUE) (unit_space_MTA$distance)
RT
generates a unit space for the Recognition-Taguchi (RT) method. In
general_MT
, the inversed correlation matrix is used for A and
the data are transformed by the function to be generated by
generates_dimensionality_reduction_function
based on
unit_space_data
. In the transformation, the p variables in
unit_space_data
are reduced into 2 synthetic variables.
RT(unit_space_data, includes_transformed_data = FALSE, ...)
RT(unit_space_data, includes_transformed_data = FALSE, ...)
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. |
includes_transformed_data |
If |
... |
Passed to |
RT
returns an object of S3 class "RT". An
object of class "RT" is a list containing the following components:
A |
2 x 2 matrix. Inversed correlation matrix of the transformed
|
calc_A |
|
transforms_data |
Function to be generated from
|
distance |
Vector with length n. Distances from the unit space to each sample. |
n |
The number of samples. |
q |
The number of variables after the data transformation. q is always 2. |
x |
If |
Taguchi, G. (2006). Objective Function and Generic Function (11). Journal of Quality Engineering Society, 14(2), 5-9. (In Japanese)
Huda, F., Kajiwara, I., Hosoya, N., & Kawamura, S. (2013). Bolt loosening analysis and diagnosis by non-contact laser excitation vibration tests. Mechanical systems and signal processing, 40(2), 589-604.
solve
, general_MT
,
generates_dimensionality_reduction_function
, and
diagnosis.MT
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_RT <- RT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE) # The following "tol" is a parameter passed to the solve function. unit_space_RT <- RT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE, tol = 1e-9) (unit_space_RT$distance)
# 40 data for versicolor in the iris dataset iris_versicolor <- iris[61:100, -5] unit_space_RT <- RT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE) # The following "tol" is a parameter passed to the solve function. unit_space_RT <- RT(unit_space_data = iris_versicolor, includes_transformed_data = TRUE, tol = 1e-9) (unit_space_RT$distance)
T1
generates a prediction expression for the two-sided Taguchi (T1)
method. In general_T
, the data are normalized by subtracting
the mean and without scaling based on unit_space_data
. The sample
data should be divided into 2 datasets in advance. One is for the unit
space and the other is for the signal space.
T1(unit_space_data, signal_space_data, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
T1(unit_space_data, signal_space_data, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
unit_space_data |
Matrix with n rows (samples) and (p + 1) columns
(variables). The 1 ~ p th columns are independent
variables and the (p + 1) th column is a dependent
variable. Underlying data to obtain a representative
point for the normalization of the
|
signal_space_data |
Matrix with m rows (samples) and (p + 1) columns (variables). The 1 ~ p th columns are independent variables and the (p + 1) th column is a dependent variable. Underlying data to generate a prediction expression. All data should be continuous values and should not have missing values. |
subtracts_V_e |
If |
includes_transformed_data |
If |
A list containing the following components is returned.
beta_hat |
Vector with length q. Estimated proportionality constants between each independent variable and the dependent variable. |
subtracts_V_e |
Logical. If |
eta_hat |
Vector with length q. Estimated squared signal-to-noise
ratios (S/N) coresponding to |
M_hat |
Vector with length n. The estimated values of the dependent
variable after the data transformation for |
overall_prediction_eta |
Numeric. The overall squared signal-to-noise ratio (S/N). |
transforms_independent_data |
Data transformation function generated
from |
transforms_dependent_data |
Data transformation function generated from
|
inverses_dependent_data |
Data transformation function generated
from |
m |
The number of samples for |
q |
The number of independent variables after the data transformation. q equals p. |
X |
If |
M |
If |
Taguchi, G. (2006). Objective Function and Generic Function (12). Journal of Quality Engineering Society, 14(3), 5-9. (In Japanese)
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
general_T
,
generates_transformation_functions_T1
, and
forecasting.T1
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] model_T1 <- T1(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model_T1$M_hat)
# The value of the dependent variable of the following samples mediates # in the stackloss dataset. stackloss_center <- stackloss[c(9, 10, 11, 20, 21), ] # The following samples are data other than the unit space data and the test # data. stackloss_signal <- stackloss[-c(2, 9, 10, 11, 12, 19, 20, 21), ] model_T1 <- T1(unit_space_data = stackloss_center, signal_space_data = stackloss_signal, subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model_T1$M_hat)
Ta
generates a prediction expression for the Ta method. In
general_T
, the data are normalized by subtracting the mean
and without scaling based on sample_data
. The sample data are not
divided into 2 datasets. All the sample data are used for both unit space
and signal space.
Ta(sample_data, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
Ta(sample_data, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
sample_data |
Matrix with n rows (samples) and (p + 1) columns (variables). The 1 ~ p th columns are independent variables and the (p + 1) th column is a dependent variable. All data should be continuous values and should not have missing values. |
subtracts_V_e |
If |
includes_transformed_data |
If |
A list containing the following components is returned.
beta_hat |
Vector with length q. Estimated proportionality constants between each independent variable and the dependent variable. |
subtracts_V_e |
Logical. If |
eta_hat |
Vector with length q. Estimated squared signal-to-noise
ratios (S/N) coresponding to |
M_hat |
Vector with length n. The estimated values of the dependent
variable after the data transformation for |
overall_prediction_eta |
Numeric. The overall squared signal-to-noise ratio (S/N). |
transforms_independent_data |
Data transformation function generated
from |
transforms_dependent_data |
Data transformation function generated from
|
inverses_dependent_data |
Data transformation function generated
from |
m |
The number of samples for |
q |
The number of independent variables after the data transformation. q equals p. |
X |
If |
M |
If |
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
general_T
,
generates_transformation_functions_T1
, and
forecasting.Ta
model_Ta <- Ta(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model_Ta$M_hat)
model_Ta <- Ta(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model_Ta$M_hat)
Tb
generates a prediction expression for the Tb method. In
general_T
, the data are normalized by subtracting the center
and without scaling based on sample_data
. The center is determined
by the specific way for the Tb method. For details, please see
generates_transformation_functions_Tb
. All the sample data
are used for both unit space and signal space.
Tb(sample_data, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
Tb(sample_data, subtracts_V_e = TRUE, includes_transformed_data = FALSE)
sample_data |
Matrix with n rows (samples) and (p + 1) columns (variables). The 1 ~ p th columns are independent variables and the (p + 1) th column is a dependent variable. All data should be continuous values and should not have missing values. |
subtracts_V_e |
If |
includes_transformed_data |
If |
A list containing the following components is returned.
beta_hat |
Vector with length q. Estimated proportionality constants between each independent variable and the dependent variable. |
subtracts_V_e |
Logical. If |
eta_hat |
Vector with length q. Estimated squared signal-to-noise
ratios (S/N) coresponding to |
M_hat |
Vector with length n. The estimated values of the dependent
variable after the data transformation for |
overall_prediction_eta |
Numeric. The overall squared signal-to-noise ratio (S/N). |
transforms_independent_data |
Data transformation function generated
from |
transforms_dependent_data |
Data transformation function generated from
|
inverses_dependent_data |
Data transformation function generated
from |
m |
The number of samples for |
q |
The number of independent variables after the data transformation. q equals p. |
X |
If |
M |
If |
Inou, A., Nagata, Y., Horita, K., & Mori, A. (2012). Prediciton Accuracies of Improved Taguchi's T Methods Compared to those of Multiple Regresssion Analysis. Journal of the Japanese Society for Quality Control, 42(2), 103-115. (In Japanese)
Kawada, H., & Nagata, Y. (2015). An application of a generalized inverse regression estimator to Taguchi's T-Method. Total Quality Science, 1(1), 12-21.
general_T
,
generates_transformation_functions_Tb
, and
forecasting.Tb
model_Tb <- Tb(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model_Tb$M_hat)
model_Tb <- Tb(sample_data = stackloss[-c(2, 12, 19), ], subtracts_V_e = TRUE, includes_transformed_data = TRUE) (model_Tb$M_hat)