(ns code.experiments.scale (:use (code.utils utils preprocess)) (:use (code.pls cliff ncliff)) (:use (code.data data)) (:use (code.privacy datafly query_generator query_sad))) (defn scale-experiment [treatments data1 distance-fn result-pathname & options] (let [opts (when options (apply assoc {} options)) data (pre-data (eval data1)) sav (or (:sav opts) [10 20]) q (or (:q opts) 4) num (or (:num opts) 10) n (or (:n opts) 10) r (or (:r opts) [0.1501 0.3501]) pro (or (:pro opts) ncliff) opro (or (:opro opts) ocliff) privs (map #(time ((eval %) n data sav r pro opro distance-fn)) treatments)] (def *priv-results* (first (first privs))))) (defn run-scale-experiment [ ] (binding [*out* (java.io.FileWriter. "/home/fayola/ourprivacy/results/scale/privacy-time.txt")] (let [test-names ['ant13 'arc 'camel10 'poi15 'redaktor 'skarbonka 'tomcat 'velocity14 'xalan24 'xerces12]] (loop [test-name test-names result nil] (if (empty? test-name) result (recur (rest test-name) (do (println " ") (println (first test-name)) (println " ") (scale-experiment ['morph1 'morph3 'morph10 'morph20 'morph40 'swap10 'swap20 'swap40 'datafly2 'datafly4] (first test-name) numeric "/home/fayola/ourprivacy/results/scale/")))))) (flush)))