Skip to content

Instantly share code, notes, and snippets.

Josh Tilles MerelyAPseudonym

Block or report user

Report or block MerelyAPseudonym

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MerelyAPseudonym
MerelyAPseudonym / gist:5273905
Last active Mar 29, 2019
implementation of an exponentially weighted moving-average function (instigated by http://grahamstratton.org/straightornamental/entries/moreclojure)
View gist:5273905
(defn ema [f values]
(reductions (fn [running v]
(let [one-minus-F (- 1 f)] ;naming intermediate results can help with the readability of non-associative operators.
(+ (* f v)
(* one-minus-F running))))
values))
You can’t perform that action at this time.