grey_analysis | R Documentation |
A collection of functions for performing grey relational analysis, including calculation of grey correlation degree and evaluation based on grey correlation. These functions are designed for decision-making and data analysis by measuring the relational degree between sequences.
gray_corr(ck, bj, rho = 0.5, w = NULL)
gray_corr_eval(A, w, rho = 0.5)
ck |
Numeric vector, the reference sequence for |
bj |
Numeric matrix or data.frame, the comparison sequences for |
rho |
Numeric scalar, the distinguishing coefficient (default = 0.5). |
w |
Numeric vector, weights for weighted correlation (default = equal weights). |
A |
Numeric matrix or data.frame, the decision matrix for |
These functions implement grey relational analysis for evaluating relationships between sequences or decision alternatives:
gray_corr
: Computes the grey correlation degree between a reference
sequence (ck
) and comparison sequences (bj
) using the distinguishing
coefficient (rho
) and optional weights (w
).
gray_corr_eval
: Evaluates a decision matrix (A
) by normalizing
it, applying weights (w
), computing grey correlation with the ideal sequence,
and scaling results to 0, 100.
gray_corr
: Numeric vector, the grey correlation degree for each comparison sequence.
gray_corr_eval
: Numeric vector, normalized evaluation scores in 0, 100.
# Grey correlation degree
ck = 1:3
bj = data.frame(x1 = c(1, 2, 4), x2 = c(2, 3, 5))
gray_corr(ck, bj, rho = 0.5)
# Grey correlation evaluation#'
w = c(0.4, 0.6)
gray_corr_eval(bj, w, rho = 0.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.