entropy_weight: Entropy Weight Method

Description Usage Arguments Details Value Examples

View source: R/essential_algorithms.R

Description

entropy_weight is for calculating Entropy Weight.

Usage

1
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

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

creditmodel documentation built on Jan. 7, 2022, 5:06 p.m.