1.2.3-SNAPSHOT Arrow_down_16x16

predict

incanter.stats

  • (predict model x)
Takes a linear-model and an x value (either a scalar or vector)
and returns the predicted value based on the linear-model.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/stats.clj:2659 top

(defn predict
"Takes a linear-model and an x value (either a scalar or vector)
 and returns the predicted value based on the linear-model."
 ([model x]
   (let [predictor (if (coll? x)
                      (cons 1 x)
                      [1 x])]
   (mmult (trans (:coefs model))
          predictor))))
Vars in incanter.stats/predict: defn let
Used in 0 other vars

Comments top

No comments for predict. Log in to add a comment.