cr_softmax: Apply soft maximum (softmax) choice rule for binary...

Description Usage Arguments Value References Examples

View source: R/cr_softmax.R

Description

Apply soft maximum (softmax) choice rule for binary predictions

Usage

1
cr_softmax(x, tau)

Arguments

x

A numeric vector or matrix with probabilistic predictions for actions. If x is a vector, binary actions are assumed. If x is a matrix, column 1 holds predictions for action 1, column 2 for action 2, etc. x can also be a value difference such as x = price - utility.

tau

A number above 0 making action selection more random (aka temperature parameter). Large values make actions equiprobable, small values close to zero generate deterministic choices, close to arg max choices or Softmax-greedy choices.

Value

A matrix holding the probability to select each action in a column

References

Sutton, R. S., & Barto, A. G. (1998). Reinforcement learning: An introduction. Cambridge, MA: MIT Press

Examples

1
# No examples

JanaJarecki/cognitiveutils documentation built on Sept. 9, 2020, 9:11 a.m.