Non-linear models are similar to linear regression models, except that the lines aren't straight.
Well, that's overly simplistic and a little tongue-in-cheek, but it does have a grain of truth. We're looking to find a formula that best fits the data, but without the restriction that the formula be linear. This introduces a lot of complications and makes the problem significantly more difficult. Unlike linear regressions, fitting non-linear models typically involves a lot more guessing and trial-and-error.
We'll need to declare Incanter as a dependency in the Leiningen project.clj
file.
:dependencies [[org.clojure/clojure "1.4.0"] [incanter "1.4.1"]]
We'll also need to require a number of Incanter's namespaces in our script or REPL.
(require '[incanter.core :as i] 'incanter.io '[incanter.optimize :as o] '[incanter.stats :as s] '[incanter.charts :as c]) (import [java.lang Math])