Returns the Zipf distribution in which the numbers k=1..n have
probabilities proportional to 1/k^s.
(defn zipf "Returns the Zipf distribution in which the numbers k=1..n have probabilities proportional to 1/k^s." [s n] (make-distribution (range 1 (inc n)) #(/ (java.lang.Math/pow % s))))
Comments top
No comments for zipf. Log in to add a comment.