entropy_weight {creditmodel}R Documentation

Entropy Weight Method

Description

entropy_weight is for calculating Entropy Weight.

Usage

entropy_weight(dat, pos_vars, neg_vars)

Arguments

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.

Details

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.

Value

A data.frame with weights of each variable.

Examples

entropy_weight(dat = ewm_data,
              pos_vars = c(6,8,9,10),
              neg_vars = c(7,11))

[Package creditmodel version 1.3.1 Index]