Skip to content

Instantly share code, notes, and snippets.

Last active Aug 7, 2017
What would you like to do?
Convert a 2d collection into an anomaly detector
(ns detector
(:require (bigml.api [core :as api]
[source :as source]
[dataset :as dataset]
[anomaly-detector :as anomaly-detector]
[anomaly-score :as anomaly-score])
( [csv :as csv])))
(defn data->detector [data]
(-> (source/create data)
(anomaly-detector/create :forest_size 64)
;; A tiny example...
(def my-detector
(-> (slurp "")
(println (my-detector [0.5 0.45 0.4 0.44 0.01]))
;; 0.3936344773676654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment