apply.entropy: Find entropy of each criteria

View source: R/ENTROPY.R

apply.entropyR Documentation

Find entropy of each criteria

Description

Find entropy of each criteria

Usage

apply.entropy(A, normalized = FALSE)

Arguments

A

the matrix A with row names corresponding to alternatives and column names corresponding to criteria

normalized

logical; if TRUE, A is treated as already normalized (column-sum normalization) and the internal normalization step is skipped. Defaults to FALSE.

Value

the entropy value corresponding to each criteria

Examples

A <- matrix(c(250, 200, 300, 275,
 225, 16, 16, 32,
  32, 16, 12, 8,
   16, 8, 16, 5,
    3, 4, 4, 2), nrow=5, ncol=4)
colnames(A)<-c("Price", "Storage space",
 "Camera", "Looks")
rownames(A)<-paste0("Mobile ", seq(1, 5, 1))
A[,"Price"] <- -A[,"Price"]
apply.entropy(A)

RMCDA documentation built on June 28, 2026, 1:06 a.m.