Coder Social home page Coder Social logo

bandit's People

Contributors

pingles avatar quantisan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bandit's Issues

CompilerException when I use a/mk-arms (first usage)

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?

Softmax throwing stack overflow error (First use)

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.

Here is error message,

java.lang.StackOverflowError: null
Random.java:532 java.util.Random.nextDouble
Math.java:773 java.lang.Math.random
core.clj:4515 clojure.core/rand
softmax.clj:33 bandit.algo.softmax/select-arm
softmax.clj:33 bandit.algo.softmax/select-arm

Could you please help me resolving this error?
-Parth

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.