Fork me on GitHub
#core-matrix
<
2016-01-15
>
jstokes01:01:06

i came up with something like this.. (defn argmax [v] (key (apply max-key val (zipmap (range) v))))

jstokes01:01:27

didnt know if there was a more efficient impl for core.matrix

blueberry09:01:16

@jstokes In neanderthal, there is iamax function that gives you the index of such element. Perhaps core.matrix have similar method that you can use to later retrieve the value.

jstokes14:01:05

thanks @blueberry - i’m getting a class not found exception for clojure.lang.Tuple, but I’ll play around with this when I get a little more time

blueberry16:01:36

@jstokes are you sure you've tried the latest version? that Tuple thing is not related to neanderthal, but to some changes in Clojure's RC versions. Anyway, if the release is not working, pull the snapshot from the github and there should be no problems - i compiled the same a few days ago. Additionally, make sure you use Java 8, and not an earlier version.

blueberry16:01:29

@jstokes: And try with Clojure 1.8.0-RC5 just to make sure...