… SVD. Includes unit tests.
…plot* fn breaks option map structure, removed from macro.
- Evaluating (stats/sample-multinomial 1) causes the exception java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Double, because sample-uniform returns a sequence if called with a size > 1 and a double otherwise. - This happens because sample-uniform returns a double if called with size=1 and a seq otherwise. The fix is to make sample-uniform always return a seq, even if it just has one element. - There is only one place where sample-uniform is called with size=1 and this commit updates the call. - There are two places where sample-uniform is called with size passed in as a parameter. One call is in a place in sample where it is always true that size>1. The other call is in sample-multinomial and this commit fixes the problem there.
…pace modified: project.clj modified: src/incanter/core.clj
Currently, there are a number of cases that use (when ...) but then use nil as the truth statement. Instead, these can be considerably simplified by using (when-not ...) for the singular case. This also includes readability changes to use (inc ...) and (zero? ...).
Instead of doing addition and subtraction as (+ x 1) and (- x 1), respectively. Use the provided functions within Clojure to improve readibility for users reading through incanter.