diagnosis.RT {MTSYS}R Documentation

Diagnosis method for the Recognition-Taguchi (RT) method

Description

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.

Usage

## S3 method for class 'RT'
diagnosis(unit_space, newdata, threshold,
  includes_transformed_newdata = FALSE)

Arguments

unit_space

Object of class "RT" generated by RT or generates_unit_space(..., method = "RT").

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 (TRUE) or negative (FALSE).

includes_transformed_newdata

If TRUE, then the transformed data for newdata are included in a return object.

Value

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 (TRUE) or not (FALSE).

threshold

Numeric value to classify the sample into positive or negative.

unit_space

Object of class "RT" passed by unit_space.

n

The number of samples for newdata.

q

The number of variables after the data transformation. q is always 2.

x

If includes_transformed_newdata is TRUE, then the transformed data for newdata are included.

References

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.

See Also

general_diagnosis.MT and RT

Examples

# 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)


[Package MTSYS version 1.2.0 Index]