Liking cljdoc? Tell your friends :D

bandit.arms

Arms are used to track the performance of a bandit for the algorithm.

Arms are used to track the performance of a bandit for the algorithm.
raw docstring

exploitclj

(exploit k arms)

identifies the arm with the highest value for (k arm)

identifies the arm with the highest value for (k arm)
raw docstring

mk-armclj

(mk-arm name)
(mk-arm name & keyvals)

mk-armsclj

(mk-arms & names)

Creates a sorted map to hold onto the state of arms

Creates a sorted map to hold onto the state of arms
raw docstring

pulledclj

(pulled {:keys [pulls] :as arm})

Record that we've pulled the arm. Allows the pull and reward to be tracked in separate events. e.g: (-> arm (pulled) (reward 0))

Record that we've pulled the arm. Allows the pull and reward
to be tracked in separate events.
e.g: (-> arm (pulled) (reward 0))
raw docstring

rewardclj

(reward {:keys [pulls] :as arm} reward)

updates the arm given a reward (numeric value)

updates the arm given a reward (numeric value)
raw docstring

total-pullsclj

(total-pulls arms)

unpulledclj

(unpulled arms)

updateclj

(update {:keys [name] :as arm} arms)

merges the updated arm back into arms

merges the updated arm back into arms
raw docstring

weighted-valueclj

(weighted-value {:keys [pulls value] :as arm} reward)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close