Problems with linear model in Incanter 1.9.2

40 views
Skip to first unread message

Goldritter

unread,
Jun 3, 2018, 7:02:55 AM6/3/18
to Incanter
Hello,
I try to use the linear model in Incanter 1.9.2 but I get always the error, that "something" cannot be cast into a Number.


(def X (cl/matrix [8.401 14.475 13.396 12.127 5.044
                   8.339 15.692 17.108 9.253 12.029]))

(def Y (cl/vector [-1.57 2.32 0.424 0.814 -2.3 0.01
                   1.954 2.296 -0.635 0.328]))
=> #'export.esicm.export/X
=> #'export.esicm.export/Y
(INCANTER-STATS/linear-model Y X)
ClassCastException clatrix.core.Vector cannot be cast to java.lang.Number  clojure.lang.Numbers.minus (Numbers.java:137)

(INCANTER-STATS/linear-model [1 2 3] [1 2 3])
ClassCastException mikera.vectorz.Scalar cannot be cast to java.lang.Number  clojure.lang.Numbers.minus (Numbers.java:137)

I use Clojure 1.8.0 and have following dependencies:
;; Math dependencies
[org.clojure/math.numeric-tower "0.0.4"]
[org.clojure/data.priority-map "0.0.5"]
[org.clojure/math.combinatorics "0.1.4"]
[net.mikera/core.matrix "0.60.3"]
[clatrix "0.3.0"]
[net.mikera/vectorz-clj "0.47.0"]
[distributions "0.1.2"]

;; Statistical dependencies
[incanter/incanter-core "1.9.2"]
[incanter/incanter-charts "1.9.2"]
[incanter/incanter-excel "1.9.2"]

With best regards
Marcus

Alex Ott

unread,
Jun 10, 2018, 7:44:11 AM6/10/18
to inca...@googlegroups.com
Hi

Can you file an issue for it?

--

---
You received this message because you are subscribed to the Google Groups "Incanter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to incanter+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
With best wishes,                    Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)

Goldritter

unread,
Jun 10, 2018, 9:44:28 AM6/10/18
to Incanter
I've created the issue.

Marcus
Reply all
Reply to author
Forward
0 new messages