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.
(exploit k arms)
identifies the arm with the highest value for (k arm)
identifies the arm with the highest value for (k arm)
(mk-arm name)
(mk-arm name & keyvals)
(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
(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))
(reward {:keys [pulls] :as arm} reward)
updates the arm given a reward (numeric value)
updates the arm given a reward (numeric value)
(total-pulls arms)
(unpulled arms)
(update {:keys [name] :as arm} arms)
merges the updated arm back into arms
merges the updated arm back into arms
(weighted-value {:keys [pulls value] :as arm} reward)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close