Created
June 13, 2012 23:38
-
-
Save danhammer/2927161 to your computer and use it in GitHub Desktop.
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
(def beta (let [src (hfs-seqfile "/mnt/hgfs/Dropbox/betas")] | |
(vec (flatten | |
(??<- [?beta] | |
(src _ ?eco ?beta) | |
(= ?eco 40146)))))) | |
(defn logistic-prob-wrap | |
[beta-vec feature-vec] | |
(let [beta-mat (to-double-rowmat beta-vec) | |
features-mat (to-double-rowmat (vec (flatten feature-vec)))] | |
(flatten (vec (.toArray (logistic-prob beta-mat features-mat)))))) | |
(defbufferop get-shorty | |
[tuples] | |
[[(vec (map #(nth % 5) (map #(nth % 1) (sort-by first tuples))))]]) | |
(def x (let [src (hfs-seqfile "/mnt/hgfs/Dropbox/dan/part-00000")] | |
(??<- [?mod-h ?mod-v ?sample ?line ?shorty-vec] | |
(src ?mod-h ?mod-v ?sample ?line ?period ?feature-vec) | |
(= ?sample 300) | |
(get-shorty ?period ?feature-vec :> ?shorty-vec)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment