Clojure wrapper for high-level prediction code
Clojure wrapper for high-level prediction code
(create-predictor predictor)
Create a predictor from the given string. The string can be either a path to a file on the local file system that contains the JSON representation of the model, or the JSON data itself.
Create a predictor from the given string. The string can be either a path to a file on the local file system that contains the JSON representation of the model, or the JSON data itself.
(predict p instance)
Makes a prediction on the given instance with the given predictor.
The instance
maybe either a map or a sequence. If the former, the
map keys may be field names or ids, and they may be either strings
or keywords. Returns a vector containing the probabilities for each
class, or, for regression models, a vector containing a single
element which is the prediction
Makes a prediction on the given instance with the given predictor. The `instance` maybe either a map or a sequence. If the former, the map keys may be field names or ids, and they may be either strings or keywords. Returns a vector containing the probabilities for each class, or, for regression models, a vector containing a single element which is the prediction
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close