calculate_entropy: Calculate the entropy of each action in the design

Description Usage Arguments Value Examples

View source: R/calc_entropy.R

Description

The function is a wrapper for calc_entropy and is meant for external use by the user. The goal for the decision maker is to choose an action such that the observer is left as clueless as possible as to which rule governs his actions, i.e. maximize entropy.

Usage

1
calculate_entropy(design, priors = NULL)

Arguments

design

A matrix with rows equal to the number of rules and columns equal to the number of actions or a list of such matrices.

priors

A vector of prior values. If the design is a list of matrices, priors can be a matrix with rows equal to the length of the design and columns equal to the number of rules.

Value

A list of of vectors of entropies for each possible action with the following attributes:

  1. design

  2. priors

  3. pr_aj_rk

  4. pr_rk_aj

Examples

1
2
3
4
5
6
    design <- matrix(c(-1, -1, -1, -1,  1,
                       -1,  0,  0, -1,  0,
                       -1,  0, -1,  0,  0, 
                        0,  0, -1,  0, -1), nrow = 4L, byrow = TRUE)

calculate_entropy(design)

obfuscatoR documentation built on Nov. 19, 2020, 9:07 a.m.