Created
December 29, 2016 19:16
-
-
Save defndaines/81652a1faa5abb20ec5bfde2dc844c4e to your computer and use it in GitHub Desktop.
Area Under the Curve [AUC]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defn auc [lines] | |
| (let [[a _ n fp' p tp'] (reduce iter [0 Double/NEGATIVE_INFINITY 0 0 0 0] lines)] | |
| (/ (+ a (trap-area n fp' n tp')) | |
| (* p n)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment