pingles / bandit Goto Github PK
View Code? Open in Web Editor NEWMulti-armed bandit algorithms in Clojure
Multi-armed bandit algorithms in Clojure
Hi,
Running the first code snippet in README.md, I (ahem) ran into a little hitch.
I entered the forms in a leiningen 2.3.4 repl.
user=> (ns mybandit.core)
nil
mybandit.core=> (load "core")
And got the response:
CompilerException java.lang.RuntimeException: No such var: a/mk-arms, compiling:(mybandit/core.clj:9:11)
In my core.clj, I had:
(ns mybandit.core
(:require
[clj-bandit.arms :as a]
[clj-bandit.algo.epsilon :as e]))
...
;; the rest of the code in README.md
If I repeat the actions in a repl, as opposed to loading core.clj, the call a/mk-arms causes the same runtime exception as above.
(def arms
(a/mk-arms :arm1 :arm2 :arm3 :arm4 :arm5))
I replaced it with the exact same implementation of mk-arms in arms.clj
;; in core.clj, right after the namespace definition.
(defn mk-arms [& names]
(apply sorted-map (interleave names (map a/mk-arm names))))
(def arms (mk-arms :arm1 :arm2 :arm3 :arm4 :arm5))
...
Which, when ran like this, works well just as the recipe describes. Have you seen this issue anywhere else?
Hey,
Thanks for sharing this, While running this code as you mentioned in README.md I'm getting stack overflow error while running softmax algorithm using simulation.clj code.
Could you please help me resolving this error?
-Parth
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.