Skip to content

Instantly share code, notes, and snippets.

@mjul
Created October 14, 2011 14:08
Show Gist options
  • Select an option

  • Save mjul/1287213 to your computer and use it in GitHub Desktop.

Select an option

Save mjul/1287213 to your computer and use it in GitHub Desktop.
Incanter statistical regression test, plot measurements of latency and overlay a linear model for the scalability (latency as function of number of clients) (Clojure Incanter)
(defn regression-nclients-ms [ds]
(with-data ds
(let [x ($ :nclients)
y ($ :ms)
lm (linear-model y x)]
(doto (scatter-plot x y :x-label "Number of clients." :y-label "Latency (ms)")
(add-lines x (:fitted lm))
(set-title "Regression: linear model of number of clients to latency")
view))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment