entropy_weight {creditmodel} | R Documentation |
entropy_weight
is for calculating Entropy Weight.
entropy_weight(dat, pos_vars, neg_vars)
dat |
A data.frame with independent variables. |
pos_vars |
Names or index of positive direction variables, the bigger the better. |
neg_vars |
Names or index of negative direction variables, the smaller the better. |
Step1 Raw data normalization Step2 Find out the total amount of contributions of all samples to the index Xj Step3 Each element of the step generated matrix is transformed into the product of each element and the LN (element), and the information entropy is calculated. Step4 Calculate redundancy. Step5 Calculate the weight of each index.
A data.frame with weights of each variable.
entropy_weight(dat = ewm_data,
pos_vars = c(6,8,9,10),
neg_vars = c(7,11))