Last chance! 50% off unlimited learning
Sale ends in
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)
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 that returns A in a quadratic form x'Ax. calc_A
takes the transformed data as an (only) argument.
Function that takes unit_space_data
as an (only) argument and returns a
data transformation function. The data
transformation function takes data as
an (only) argument and returns the
transformed data.
If TRUE
, then the transformed data
are included in a return object.
A list containing the following components is returned.
q x q matrix calculated by calc_A
.
Function passed by calc_A
.
Data transformation function generated from
generates_transform_function
based on
unit_space_data
.
Vector with length n. Distances from the unit space to each sample.
The number of samples.
The number of independent variables after the data transformation. According to the data transoformation function, q may be equal to p.
If includes_transformed_data
is TRUE
, then the
transformed data are included.
# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab